Skip to content

Commit bb373ca

Browse files
committed
add slt
1 parent 1001bad commit bb373ca

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

datafusion/sqllogictest/test_files/window.slt

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ logical_plan
17671767
01)Projection: count(Int64(1)) AS count(*) AS global_count
17681768
02)--Aggregate: groupBy=[[]], aggr=[[count(Int64(1))]]
17691769
03)----SubqueryAlias: a
1770-
04)------Projection:
1770+
04)------Projection:
17711771
05)--------Aggregate: groupBy=[[aggregate_test_100.c1]], aggr=[[]]
17721772
06)----------Projection: aggregate_test_100.c1
17731773
07)------------Filter: aggregate_test_100.c13 != Utf8("C2GT5KVyOPZpgKVl110TyZO0NcJ434")
@@ -5352,7 +5352,7 @@ order by c1, c2, rank;
53525352
query TT
53535353
explain select c1, c2, rank1, rank2
53545354
from (
5355-
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
5355+
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
53565356
rank() over (partition by c2, c1 order by c1) as rank2
53575357
from t1
53585358
)
@@ -5386,7 +5386,7 @@ physical_plan
53865386
query IIII
53875387
select c1, c2, rank1, rank2
53885388
from (
5389-
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
5389+
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
53905390
rank() over (partition by c2, c1 order by c1) as rank2
53915391
from t1
53925392
)
@@ -5403,7 +5403,7 @@ order by c1, c2, rank1, rank2;
54035403
query TT
54045404
explain select c1, c2, rank1, rank2
54055405
from (
5406-
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
5406+
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
54075407
rank() over (partition by c2, c1 order by c1) as rank2
54085408
from t1
54095409
)
@@ -5437,7 +5437,7 @@ physical_plan
54375437
query IIII
54385438
select c1, c2, rank1, rank2
54395439
from (
5440-
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
5440+
select c1, c2, rank() over (partition by c1 order by c2) as rank1,
54415441
rank() over (partition by c2, c1 order by c1) as rank2
54425442
from t1
54435443
)
@@ -5536,3 +5536,18 @@ physical_plan
55365536
01)ProjectionExec: expr=[max(aggregate_test_100_ordered.c5) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING@1 as max_c5]
55375537
02)--WindowAggExec: wdw=[max(aggregate_test_100_ordered.c5) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING: Ok(Field { name: "max(aggregate_test_100_ordered.c5) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: Preceding(UInt64(NULL)), end_bound: Following(UInt64(NULL)), is_causal: false }]
55385538
03)----DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/testing/data/csv/aggregate_test_100.csv]]}, projection=[c5], file_type=csv, has_header=true
5539+
5540+
query II
5541+
SELECT
5542+
t1.v1,
5543+
SUM(t1.v1) OVER w + 1
5544+
FROM
5545+
generate_series(1, 5) AS t1(v1)
5546+
WINDOW
5547+
w AS (ORDER BY t1.v1);
5548+
----
5549+
1 2
5550+
2 4
5551+
3 7
5552+
4 11
5553+
5 16

0 commit comments

Comments
 (0)