Skip to content

Commit ab90d5c

Browse files
committed
Review feedback.
1 parent adabadb commit ab90d5c

1 file changed

Lines changed: 4 additions & 177 deletions

File tree

datafusion/sqllogictest/test_files/range_partitioning.slt

Lines changed: 4 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,13 +1051,11 @@ SELECT range_key, SUM(value) OVER (ORDER BY value) FROM range_partitioned ORDER
10511051
30 1060
10521052
35 1410
10531053

1054-
statement ok
1055-
reset datafusion.explain.physical_plan_only;
1054+
10561055

10571056
##########
10581057
# TEST 30: PartitionedTopK on Range Partition Column
1059-
# With subset threshold met and preserve-file disabled, Range([range_key])
1060-
# satisfies the TopK partition key and avoids repartitioning.
1058+
# Exact Range([range_key]) satisfies the TopK partition key and avoids repartitioning.
10611059
##########
10621060

10631061
statement ok
@@ -1075,11 +1073,6 @@ EXPLAIN SELECT * FROM (
10751073
FROM range_partitioned
10761074
) WHERE rn <= 1;
10771075
----
1078-
logical_plan
1079-
01)Projection: range_partitioned.range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1080-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1081-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1082-
04)------TableScan: range_partitioned projection=[range_key, value]
10831076
physical_plan
10841077
01)ProjectionExec: expr=[range_key@0 as range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
10851078
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
@@ -1105,8 +1098,8 @@ ORDER BY range_key;
11051098

11061099
##########
11071100
# TEST 31: PartitionedTopK on Non-Range Column
1108-
# With subset threshold met and preserve-file disabled, partitioning on a non-range
1109-
# key cannot reuse Range([range_key]) and requires hash repartitioning.
1101+
# Partitioning on a non-range key cannot reuse Range([range_key]) and
1102+
# requires hash repartitioning.
11101103
##########
11111104

11121105
statement ok
@@ -1121,11 +1114,6 @@ EXPLAIN SELECT * FROM (
11211114
FROM range_partitioned
11221115
) WHERE rn <= 1;
11231116
----
1124-
logical_plan
1125-
01)Projection: range_partitioned.non_range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1126-
02)--Filter: row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1127-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1128-
04)------TableScan: range_partitioned projection=[non_range_key, value]
11291117
physical_plan
11301118
01)ProjectionExec: expr=[non_range_key@0 as non_range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
11311119
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
@@ -1162,11 +1150,6 @@ EXPLAIN SELECT * FROM (
11621150
FROM range_partitioned
11631151
) WHERE rn <= 1;
11641152
----
1165-
logical_plan
1166-
01)Projection: range_partitioned.range_key, range_partitioned.non_range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1167-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1168-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1169-
04)------TableScan: range_partitioned projection=[range_key, non_range_key, value]
11701153
physical_plan
11711154
01)ProjectionExec: expr=[range_key@0 as range_key, non_range_key@1 as non_range_key, value@2 as value, row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@3 as rn]
11721155
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
@@ -1190,40 +1173,6 @@ ORDER BY range_key, non_range_key;
11901173
35 2 350 1
11911174

11921175

1193-
##########
1194-
# TEST 33: Exact Range PartitionedTopK Below Subset Threshold
1195-
# Even when subset satisfaction is disabled, exact Range([range_key])
1196-
# satisfies PARTITION BY range_key when repartitioning would not increase
1197-
# partition count.
1198-
##########
1199-
1200-
statement ok
1201-
set datafusion.execution.target_partitions = 4;
1202-
1203-
statement ok
1204-
set datafusion.optimizer.subset_repartition_threshold = 5;
1205-
1206-
statement ok
1207-
set datafusion.optimizer.preserve_file_partitions = 0;
1208-
1209-
query TT
1210-
EXPLAIN SELECT * FROM (
1211-
SELECT range_key, value, ROW_NUMBER() OVER (PARTITION BY range_key ORDER BY value DESC) as rn
1212-
FROM range_partitioned
1213-
) WHERE rn <= 1;
1214-
----
1215-
logical_plan
1216-
01)Projection: range_partitioned.range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1217-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1218-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1219-
04)------TableScan: range_partitioned projection=[range_key, value]
1220-
physical_plan
1221-
01)ProjectionExec: expr=[range_key@0 as range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
1222-
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
1223-
03)----PartitionedTopKExec: fetch=1, partition=[range_key@0], order=[value@1 DESC]
1224-
04)------DataSourceExec: file_groups={4 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-0.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-1.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-2.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-3.csv]]}, projection=[range_key, value], output_partitioning=Range([range_key@0 ASC], [(10), (20), (30)], 4), file_type=csv, has_header=false
1225-
1226-
12271176
##########
12281177
# TEST 34: Range Subset PartitionedTopK Rehashes Below Subset Threshold
12291178
# Range([range_key]) is only a subset of PARTITION BY (range_key, non_range_key),
@@ -1246,138 +1195,16 @@ EXPLAIN SELECT * FROM (
12461195
FROM range_partitioned
12471196
) WHERE rn <= 1;
12481197
----
1249-
logical_plan
1250-
01)Projection: range_partitioned.range_key, range_partitioned.non_range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1251-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1252-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1253-
04)------TableScan: range_partitioned projection=[range_key, non_range_key, value]
12541198
physical_plan
12551199
01)ProjectionExec: expr=[range_key@0 as range_key, non_range_key@1 as non_range_key, value@2 as value, row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@3 as rn]
12561200
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key, range_partitioned.non_range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
12571201
03)----PartitionedTopKExec: fetch=1, partition=[range_key@0, non_range_key@1], order=[value@2 DESC]
12581202
04)------RepartitionExec: partitioning=Hash([range_key@0, non_range_key@1], 4), input_partitions=4
12591203
05)--------DataSourceExec: file_groups={4 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-0.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-1.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-2.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-3.csv]]}, projection=[range_key, non_range_key, value], output_partitioning=Range([range_key@0 ASC], [(10), (20), (30)], 4), file_type=csv, has_header=false
12601204

1261-
1262-
##########
1263-
# TEST 35: PartitionedTopK Rehashes Below Subset Threshold
1264-
# With subset threshold 5 and only 4 input partitions, planning repartitions
1265-
# to increase parallelism instead of reusing Range partitioning.
1266-
##########
1267-
1268-
statement ok
1269-
set datafusion.execution.target_partitions = 5;
1270-
1271-
statement ok
1272-
set datafusion.optimizer.subset_repartition_threshold = 5;
1273-
1274-
statement ok
1275-
set datafusion.optimizer.preserve_file_partitions = 0;
1276-
1277-
query TT
1278-
EXPLAIN SELECT * FROM (
1279-
SELECT range_key, value, ROW_NUMBER() OVER (PARTITION BY range_key ORDER BY value DESC) as rn
1280-
FROM range_partitioned
1281-
) WHERE rn <= 1;
1282-
----
1283-
logical_plan
1284-
01)Projection: range_partitioned.range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1285-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1286-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1287-
04)------TableScan: range_partitioned projection=[range_key, value]
1288-
physical_plan
1289-
01)ProjectionExec: expr=[range_key@0 as range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
1290-
02)--BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
1291-
03)----PartitionedTopKExec: fetch=1, partition=[range_key@0], order=[value@1 DESC]
1292-
04)------RepartitionExec: partitioning=Hash([range_key@0], 5), input_partitions=4
1293-
05)--------DataSourceExec: file_groups={4 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-0.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-1.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-2.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-3.csv]]}, projection=[range_key, value], output_partitioning=Range([range_key@0 ASC], [(10), (20), (30)], 4), file_type=csv, has_header=false
1294-
1295-
statement ok
1296-
set datafusion.execution.target_partitions = 4;
1297-
12981205
statement ok
12991206
reset datafusion.optimizer.subset_repartition_threshold;
13001207

1301-
1302-
##########
1303-
# TEST 36: PartitionedTopK Preserves Range When Preserve File Threshold Met
1304-
# With preserve-file threshold 1 and 4 input partitions, Range is preserved
1305-
# even though target_partitions is 5.
1306-
##########
1307-
1308-
statement ok
1309-
set datafusion.execution.target_partitions = 5;
1310-
1311-
statement ok
1312-
set datafusion.optimizer.subset_repartition_threshold = 4;
1313-
1314-
statement ok
1315-
set datafusion.optimizer.preserve_file_partitions = 1;
1316-
1317-
query TT
1318-
EXPLAIN SELECT * FROM (
1319-
SELECT range_key, value, ROW_NUMBER() OVER (PARTITION BY range_key ORDER BY value DESC) as rn
1320-
FROM range_partitioned
1321-
) WHERE rn <= 1;
1322-
----
1323-
logical_plan
1324-
01)Projection: range_partitioned.range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1325-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1326-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1327-
04)------TableScan: range_partitioned projection=[range_key, value]
1328-
physical_plan
1329-
01)ProjectionExec: expr=[range_key@0 as range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
1330-
02)--RepartitionExec: partitioning=RoundRobinBatch(5), input_partitions=4
1331-
03)----BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
1332-
04)------PartitionedTopKExec: fetch=1, partition=[range_key@0], order=[value@1 DESC]
1333-
05)--------DataSourceExec: file_groups={4 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-0.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-1.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-2.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-3.csv]]}, projection=[range_key, value], output_partitioning=Range([range_key@0 ASC], [(10), (20), (30)], 4), file_type=csv, has_header=false
1334-
1335-
statement ok
1336-
set datafusion.execution.target_partitions = 4;
1337-
1338-
statement ok
1339-
reset datafusion.optimizer.preserve_file_partitions;
1340-
1341-
1342-
##########
1343-
# TEST 37: PartitionedTopK Rehashes When Preserve File Threshold Not Met
1344-
# With preserve-file threshold 5 and only 4 input partitions, planning can
1345-
# repartition to increase parallelism.
1346-
##########
1347-
1348-
statement ok
1349-
set datafusion.execution.target_partitions = 5;
1350-
1351-
statement ok
1352-
set datafusion.optimizer.subset_repartition_threshold = 4;
1353-
1354-
statement ok
1355-
set datafusion.optimizer.preserve_file_partitions = 5;
1356-
1357-
query TT
1358-
EXPLAIN SELECT * FROM (
1359-
SELECT range_key, value, ROW_NUMBER() OVER (PARTITION BY range_key ORDER BY value DESC) as rn
1360-
FROM range_partitioned
1361-
) WHERE rn <= 1;
1362-
----
1363-
logical_plan
1364-
01)Projection: range_partitioned.range_key, range_partitioned.value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS rn
1365-
02)--Filter: row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW <= UInt64(1)
1366-
03)----WindowAggr: windowExpr=[[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]]
1367-
04)------TableScan: range_partitioned projection=[range_key, value]
1368-
physical_plan
1369-
01)ProjectionExec: expr=[range_key@0 as range_key, value@1 as value, row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW@2 as rn]
1370-
02)--RepartitionExec: partitioning=RoundRobinBatch(5), input_partitions=4
1371-
03)----BoundedWindowAggExec: wdw=[row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW: Field { "row_number() PARTITION BY [range_partitioned.range_key] ORDER BY [range_partitioned.value DESC NULLS FIRST] RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW": UInt64 }, frame: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]
1372-
04)------PartitionedTopKExec: fetch=1, partition=[range_key@0], order=[value@1 DESC]
1373-
05)--------DataSourceExec: file_groups={4 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-0.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-1.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-2.csv], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch_range_partitioning/range_partitioned/part-3.csv]]}, projection=[range_key, value], output_partitioning=Range([range_key@0 ASC], [(10), (20), (30)], 4), file_type=csv, has_header=false
1374-
1375-
statement ok
1376-
set datafusion.execution.target_partitions = 4;
1377-
1378-
statement ok
1379-
reset datafusion.optimizer.preserve_file_partitions;
1380-
13811208
statement ok
13821209
reset datafusion.explain.physical_plan_only;
13831210

0 commit comments

Comments
 (0)