Skip to content

Commit cdf55dd

Browse files
committed
update slt files
1 parent 91c6c23 commit cdf55dd

24 files changed

+111
-109
lines changed

datafusion/sqllogictest/test_files/create_external_table.slt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ EXPLAIN SELECT id FROM t ORDER BY id ASC;
252252
----
253253
logical_plan
254254
01)Sort: t.id ASC NULLS LAST
255-
02)--TableScan: t projection=[id]
255+
02)--TableScan: t projection=[id] preferred_ordering=[t.id ASC NULLS LAST]
256256
physical_plan DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/parquet-testing/data/alltypes_plain.parquet]]}, projection=[id], output_ordering=[id@0 ASC NULLS LAST], file_type=parquet
257257

258258
## Test a DESC order and verify that output_ordering is ASC from the previous OBRDER BY
@@ -261,7 +261,7 @@ EXPLAIN SELECT id FROM t ORDER BY id DESC;
261261
----
262262
logical_plan
263263
01)Sort: t.id DESC NULLS FIRST
264-
02)--TableScan: t projection=[id]
264+
02)--TableScan: t projection=[id] preferred_ordering=[t.id DESC NULLS FIRST]
265265
physical_plan
266266
01)SortExec: expr=[id@0 DESC], preserve_partitioning=[false]
267267
02)--DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/parquet-testing/data/alltypes_plain.parquet]]}, projection=[id], output_ordering=[id@0 ASC NULLS LAST], file_type=parquet

datafusion/sqllogictest/test_files/csv_files.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ EXPLAIN SELECT * FROM partitioned_table ORDER BY int_col;
161161
----
162162
logical_plan
163163
01)Sort: partitioned_table.int_col ASC NULLS LAST
164-
02)--TableScan: partitioned_table projection=[int_col, string_col, bigint_col, partition_col]
164+
02)--TableScan: partitioned_table projection=[int_col, string_col, bigint_col, partition_col] preferred_ordering=[partitioned_table.int_col ASC NULLS LAST]
165165
physical_plan
166166
01)SortPreservingMergeExec: [int_col@0 ASC NULLS LAST]
167167
02)--SortExec: expr=[int_col@0 ASC NULLS LAST], preserve_partitioning=[true]

datafusion/sqllogictest/test_files/cte.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ logical_plan
10401040
04)------Projection: Int64(0) AS k, Int64(0) AS v
10411041
05)--------EmptyRelation: rows=1
10421042
06)------Sort: r.v ASC NULLS LAST, fetch=1
1043-
07)--------TableScan: r projection=[k, v]
1043+
07)--------TableScan: r projection=[k, v] preferred_ordering=[r.v ASC NULLS LAST]
10441044
physical_plan
10451045
01)GlobalLimitExec: skip=0, fetch=5
10461046
02)--RecursiveQueryExec: name=r, is_distinct=false

datafusion/sqllogictest/test_files/explain.slt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ explain SELECT c1 FROM aggregate_test_100_with_order order by c1 ASC limit 10
7676
----
7777
logical_plan
7878
01)Sort: aggregate_test_100_with_order.c1 ASC NULLS LAST, fetch=10
79-
02)--TableScan: aggregate_test_100_with_order projection=[c1]
79+
02)--TableScan: aggregate_test_100_with_order projection=[c1] preferred_ordering=[aggregate_test_100_with_order.c1 ASC NULLS LAST]
8080
physical_plan DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/aggregate_test_100_order_by_c1_asc.csv]]}, projection=[c1], limit=10, output_ordering=[c1@0 ASC NULLS LAST], file_type=csv, has_header=true
8181

8282
## explain_physical_plan_only
@@ -161,7 +161,7 @@ logical_plan
161161
01)Dml: op=[Insert Into] table=[sink_table]
162162
02)--Projection: aggregate_test_100.c1 AS c1, aggregate_test_100.c2 AS c2, aggregate_test_100.c3 AS c3, aggregate_test_100.c4 AS c4, aggregate_test_100.c5 AS c5, aggregate_test_100.c6 AS c6, aggregate_test_100.c7 AS c7, aggregate_test_100.c8 AS c8, aggregate_test_100.c9 AS c9, aggregate_test_100.c10 AS c10, aggregate_test_100.c11 AS c11, aggregate_test_100.c12 AS c12, aggregate_test_100.c13 AS c13
163163
03)----Sort: aggregate_test_100.c1 ASC NULLS LAST
164-
04)------TableScan: aggregate_test_100 projection=[c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13]
164+
04)------TableScan: aggregate_test_100 projection=[c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13] preferred_ordering=[aggregate_test_100.c1 ASC NULLS LAST]
165165
physical_plan
166166
01)DataSinkExec: sink=StreamWrite { location: "../../testing/data/csv/aggregate_test_100.csv", batch_size: 8192, encoding: Csv, header: true, .. }
167167
02)--SortExec: expr=[c1@0 ASC NULLS LAST], preserve_partitioning=[false]
@@ -560,6 +560,7 @@ logical_plan after eliminate_one_union SAME TEXT AS ABOVE
560560
logical_plan after filter_null_join_keys SAME TEXT AS ABOVE
561561
logical_plan after eliminate_outer_join SAME TEXT AS ABOVE
562562
logical_plan after push_down_limit SAME TEXT AS ABOVE
563+
logical_plan after push_down_sort SAME TEXT AS ABOVE
563564
logical_plan after push_down_filter SAME TEXT AS ABOVE
564565
logical_plan after single_distinct_aggregation_to_group_by SAME TEXT AS ABOVE
565566
logical_plan after eliminate_group_by_constant SAME TEXT AS ABOVE
@@ -582,6 +583,7 @@ logical_plan after eliminate_one_union SAME TEXT AS ABOVE
582583
logical_plan after filter_null_join_keys SAME TEXT AS ABOVE
583584
logical_plan after eliminate_outer_join SAME TEXT AS ABOVE
584585
logical_plan after push_down_limit SAME TEXT AS ABOVE
586+
logical_plan after push_down_sort SAME TEXT AS ABOVE
585587
logical_plan after push_down_filter SAME TEXT AS ABOVE
586588
logical_plan after single_distinct_aggregation_to_group_by SAME TEXT AS ABOVE
587589
logical_plan after eliminate_group_by_constant SAME TEXT AS ABOVE

datafusion/sqllogictest/test_files/filter_without_sort_exec.slt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ORDER BY "date", "time";
3535
logical_plan
3636
01)Sort: data.date ASC NULLS LAST, data.time ASC NULLS LAST
3737
02)--Filter: data.ticker = Utf8View("A")
38-
03)----TableScan: data projection=[date, ticker, time]
38+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.date ASC NULLS LAST, data.time ASC NULLS LAST]
3939
physical_plan
4040
01)SortPreservingMergeExec: [date@0 ASC NULLS LAST, time@2 ASC NULLS LAST]
4141
02)--CoalesceBatchesExec: target_batch_size=8192
@@ -52,7 +52,7 @@ ORDER BY "time"
5252
logical_plan
5353
01)Sort: data.time ASC NULLS LAST
5454
02)--Filter: data.ticker = Utf8View("A") AND CAST(data.time AS Date32) = data.date
55-
03)----TableScan: data projection=[date, ticker, time]
55+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.time ASC NULLS LAST]
5656
physical_plan
5757
01)SortPreservingMergeExec: [time@2 ASC NULLS LAST]
5858
02)--CoalesceBatchesExec: target_batch_size=8192
@@ -69,7 +69,7 @@ ORDER BY "date"
6969
logical_plan
7070
01)Sort: data.date ASC NULLS LAST
7171
02)--Filter: data.ticker = Utf8View("A") AND CAST(data.time AS Date32) = data.date
72-
03)----TableScan: data projection=[date, ticker, time]
72+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.date ASC NULLS LAST]
7373
physical_plan
7474
01)SortPreservingMergeExec: [date@0 ASC NULLS LAST]
7575
02)--CoalesceBatchesExec: target_batch_size=8192
@@ -86,7 +86,7 @@ ORDER BY "ticker"
8686
logical_plan
8787
01)Sort: data.ticker ASC NULLS LAST
8888
02)--Filter: data.ticker = Utf8View("A") AND CAST(data.time AS Date32) = data.date
89-
03)----TableScan: data projection=[date, ticker, time]
89+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.ticker ASC NULLS LAST]
9090
physical_plan
9191
01)CoalescePartitionsExec
9292
02)--CoalesceBatchesExec: target_batch_size=8192
@@ -103,7 +103,7 @@ ORDER BY "time", "date";
103103
logical_plan
104104
01)Sort: data.time ASC NULLS LAST, data.date ASC NULLS LAST
105105
02)--Filter: data.ticker = Utf8View("A") AND CAST(data.time AS Date32) = data.date
106-
03)----TableScan: data projection=[date, ticker, time]
106+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.time ASC NULLS LAST, data.date ASC NULLS LAST]
107107
physical_plan
108108
01)SortPreservingMergeExec: [time@2 ASC NULLS LAST, date@0 ASC NULLS LAST]
109109
02)--CoalesceBatchesExec: target_batch_size=8192
@@ -121,7 +121,7 @@ ORDER BY "time"
121121
logical_plan
122122
01)Sort: data.time ASC NULLS LAST
123123
02)--Filter: data.ticker = Utf8View("A") AND CAST(data.time AS Date32) != data.date
124-
03)----TableScan: data projection=[date, ticker, time]
124+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.time ASC NULLS LAST]
125125

126126
# no relation between time & date
127127
# should also be pipeline breaking
@@ -133,7 +133,7 @@ ORDER BY "time"
133133
logical_plan
134134
01)Sort: data.time ASC NULLS LAST
135135
02)--Filter: data.ticker = Utf8View("A")
136-
03)----TableScan: data projection=[date, ticker, time]
136+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.time ASC NULLS LAST]
137137

138138
# query
139139
query TT
@@ -144,7 +144,7 @@ ORDER BY "ticker", "time";
144144
logical_plan
145145
01)Sort: data.ticker ASC NULLS LAST, data.time ASC NULLS LAST
146146
02)--Filter: data.date = Date32("2006-01-02")
147-
03)----TableScan: data projection=[date, ticker, time]
147+
03)----TableScan: data projection=[date, ticker, time] preferred_ordering=[data.ticker ASC NULLS LAST, data.time ASC NULLS LAST]
148148
physical_plan
149149
01)SortPreservingMergeExec: [ticker@1 ASC NULLS LAST, time@2 ASC NULLS LAST]
150150
02)--CoalesceBatchesExec: target_batch_size=8192

datafusion/sqllogictest/test_files/group_by.slt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ EXPLAIN SELECT a FROM multiple_ordered_table ORDER BY b DESC;
20662066
logical_plan
20672067
01)Projection: multiple_ordered_table.a
20682068
02)--Sort: multiple_ordered_table.b DESC NULLS FIRST
2069-
03)----TableScan: multiple_ordered_table projection=[a, b]
2069+
03)----TableScan: multiple_ordered_table projection=[a, b] preferred_ordering=[multiple_ordered_table.b DESC NULLS FIRST]
20702070
physical_plan
20712071
01)ProjectionExec: expr=[a@0 as a]
20722072
02)--SortExec: expr=[b@1 DESC], preserve_partitioning=[false]
@@ -2080,7 +2080,7 @@ EXPLAIN SELECT a FROM multiple_ordered_table ORDER BY c ASC;
20802080
logical_plan
20812081
01)Projection: multiple_ordered_table.a
20822082
02)--Sort: multiple_ordered_table.c ASC NULLS LAST
2083-
03)----TableScan: multiple_ordered_table projection=[a, c]
2083+
03)----TableScan: multiple_ordered_table projection=[a, c] preferred_ordering=[multiple_ordered_table.c ASC NULLS LAST]
20842084
physical_plan DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[a], output_ordering=[a@0 ASC NULLS LAST], file_type=csv, has_header=true
20852085

20862086
# Final plan shouldn't have SortExec a ASC, b ASC,
@@ -2091,7 +2091,7 @@ EXPLAIN SELECT a FROM multiple_ordered_table ORDER BY a ASC, b ASC;
20912091
logical_plan
20922092
01)Projection: multiple_ordered_table.a
20932093
02)--Sort: multiple_ordered_table.a ASC NULLS LAST, multiple_ordered_table.b ASC NULLS LAST
2094-
03)----TableScan: multiple_ordered_table projection=[a, b]
2094+
03)----TableScan: multiple_ordered_table projection=[a, b] preferred_ordering=[multiple_ordered_table.a ASC NULLS LAST, multiple_ordered_table.b ASC NULLS LAST]
20952095
physical_plan DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[a], output_ordering=[a@0 ASC NULLS LAST], file_type=csv, has_header=true
20962096

20972097
# test_window_agg_sort
@@ -2248,7 +2248,7 @@ ORDER BY a, b, d;
22482248
----
22492249
logical_plan
22502250
01)Sort: annotated_data_infinite2.a ASC NULLS LAST, annotated_data_infinite2.b ASC NULLS LAST, annotated_data_infinite2.d ASC NULLS LAST
2251-
02)--TableScan: annotated_data_infinite2 projection=[a0, a, b, c, d]
2251+
02)--TableScan: annotated_data_infinite2 projection=[a0, a, b, c, d] preferred_ordering=[annotated_data_infinite2.a ASC NULLS LAST, annotated_data_infinite2.b ASC NULLS LAST, annotated_data_infinite2.d ASC NULLS LAST]
22522252
physical_plan
22532253
01)PartialSortExec: expr=[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST, d@4 ASC NULLS LAST], common_prefix_length=[2]
22542254
02)--StreamingTableExec: partition_sizes=1, projection=[a0, a, b, c, d], infinite_source=true, output_ordering=[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST, c@3 ASC NULLS LAST]
@@ -2261,7 +2261,7 @@ LIMIT 50;
22612261
----
22622262
logical_plan
22632263
01)Sort: annotated_data_infinite2.a ASC NULLS LAST, annotated_data_infinite2.b ASC NULLS LAST, annotated_data_infinite2.d ASC NULLS LAST, fetch=50
2264-
02)--TableScan: annotated_data_infinite2 projection=[a0, a, b, c, d]
2264+
02)--TableScan: annotated_data_infinite2 projection=[a0, a, b, c, d] preferred_ordering=[annotated_data_infinite2.a ASC NULLS LAST, annotated_data_infinite2.b ASC NULLS LAST, annotated_data_infinite2.d ASC NULLS LAST]
22652265
physical_plan
22662266
01)PartialSortExec: TopK(fetch=50), expr=[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST, d@4 ASC NULLS LAST], common_prefix_length=[2]
22672267
02)--StreamingTableExec: partition_sizes=1, projection=[a0, a, b, c, d], infinite_source=true, output_ordering=[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST, c@3 ASC NULLS LAST]
@@ -2273,7 +2273,7 @@ ORDER BY a, b, d;
22732273
----
22742274
logical_plan
22752275
01)Sort: multiple_ordered_table.a ASC NULLS LAST, multiple_ordered_table.b ASC NULLS LAST, multiple_ordered_table.d ASC NULLS LAST
2276-
02)--TableScan: multiple_ordered_table projection=[a0, a, b, c, d]
2276+
02)--TableScan: multiple_ordered_table projection=[a0, a, b, c, d] preferred_ordering=[multiple_ordered_table.a ASC NULLS LAST, multiple_ordered_table.b ASC NULLS LAST, multiple_ordered_table.d ASC NULLS LAST]
22772277
physical_plan
22782278
01)SortExec: expr=[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST, d@4 ASC NULLS LAST], preserve_partitioning=[false]
22792279
02)--DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[a0, a, b, c, d], output_orderings=[[a@1 ASC NULLS LAST, b@2 ASC NULLS LAST], [c@3 ASC NULLS LAST]], file_type=csv, has_header=true
@@ -2535,7 +2535,7 @@ logical_plan
25352535
02)--Aggregate: groupBy=[[s.country]], aggr=[[array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST], sum(CAST(s.amount AS Float64))]]
25362536
03)----SubqueryAlias: s
25372537
04)------Sort: sales_global.country ASC NULLS LAST, fetch=10
2538-
05)--------TableScan: sales_global projection=[country, amount]
2538+
05)--------TableScan: sales_global projection=[country, amount] preferred_ordering=[sales_global.country ASC NULLS LAST]
25392539
physical_plan
25402540
01)ProjectionExec: expr=[country@0 as country, array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST]@1 as amounts, sum(s.amount)@2 as sum1]
25412541
02)--AggregateExec: mode=Single, gby=[country@0 as country], aggr=[array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST], sum(s.amount)], ordering_mode=Sorted
@@ -2573,7 +2573,7 @@ logical_plan
25732573
02)--Aggregate: groupBy=[[s.country, s.zip_code]], aggr=[[array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST], sum(CAST(s.amount AS Float64))]]
25742574
03)----SubqueryAlias: s
25752575
04)------Sort: sales_global.country ASC NULLS LAST, fetch=10
2576-
05)--------TableScan: sales_global projection=[zip_code, country, amount]
2576+
05)--------TableScan: sales_global projection=[zip_code, country, amount] preferred_ordering=[sales_global.country ASC NULLS LAST]
25772577
physical_plan
25782578
01)ProjectionExec: expr=[country@0 as country, zip_code@1 as zip_code, array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST]@2 as amounts, sum(s.amount)@3 as sum1]
25792579
02)--AggregateExec: mode=Single, gby=[country@1 as country, zip_code@0 as zip_code], aggr=[array_agg(s.amount) ORDER BY [s.amount DESC NULLS FIRST], sum(s.amount)], ordering_mode=PartiallySorted([0])
@@ -2610,7 +2610,7 @@ logical_plan
26102610
02)--Aggregate: groupBy=[[s.country]], aggr=[[array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST], sum(CAST(s.amount AS Float64))]]
26112611
03)----SubqueryAlias: s
26122612
04)------Sort: sales_global.country ASC NULLS LAST, fetch=10
2613-
05)--------TableScan: sales_global projection=[country, amount]
2613+
05)--------TableScan: sales_global projection=[country, amount] preferred_ordering=[sales_global.country ASC NULLS LAST]
26142614
physical_plan
26152615
01)ProjectionExec: expr=[country@0 as country, array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST]@1 as amounts, sum(s.amount)@2 as sum1]
26162616
02)--AggregateExec: mode=Single, gby=[country@0 as country], aggr=[array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST], sum(s.amount)], ordering_mode=Sorted
@@ -2646,7 +2646,7 @@ logical_plan
26462646
02)--Aggregate: groupBy=[[s.country]], aggr=[[array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST, s.amount DESC NULLS FIRST], sum(CAST(s.amount AS Float64))]]
26472647
03)----SubqueryAlias: s
26482648
04)------Sort: sales_global.country ASC NULLS LAST, fetch=10
2649-
05)--------TableScan: sales_global projection=[country, amount]
2649+
05)--------TableScan: sales_global projection=[country, amount] preferred_ordering=[sales_global.country ASC NULLS LAST]
26502650
physical_plan
26512651
01)ProjectionExec: expr=[country@0 as country, array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST, s.amount DESC NULLS FIRST]@1 as amounts, sum(s.amount)@2 as sum1]
26522652
02)--AggregateExec: mode=Single, gby=[country@0 as country], aggr=[array_agg(s.amount) ORDER BY [s.country DESC NULLS FIRST, s.amount DESC NULLS FIRST], sum(s.amount)], ordering_mode=Sorted
@@ -3906,7 +3906,7 @@ ORDER BY c ASC;
39063906
----
39073907
logical_plan
39083908
01)Sort: multiple_ordered_table.c ASC NULLS LAST
3909-
02)--TableScan: multiple_ordered_table projection=[c]
3909+
02)--TableScan: multiple_ordered_table projection=[c] preferred_ordering=[multiple_ordered_table.c ASC NULLS LAST]
39103910
physical_plan DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[c], output_ordering=[c@0 ASC NULLS LAST], file_type=csv, has_header=true
39113911

39123912
statement ok
@@ -4392,7 +4392,7 @@ EXPLAIN SELECT name, date_bin('15 minutes', ts) as time_chunks
43924392
logical_plan
43934393
01)Sort: unbounded_csv_with_timestamps2.name DESC NULLS FIRST, time_chunks DESC NULLS FIRST, fetch=5
43944394
02)--Projection: unbounded_csv_with_timestamps2.name, date_bin(IntervalMonthDayNano("IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }"), unbounded_csv_with_timestamps2.ts) AS time_chunks
4395-
03)----TableScan: unbounded_csv_with_timestamps2 projection=[name, ts]
4395+
03)----TableScan: unbounded_csv_with_timestamps2 projection=[name, ts] preferred_ordering=[unbounded_csv_with_timestamps2.name DESC NULLS FIRST, date_bin(IntervalMonthDayNano("IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }"), unbounded_csv_with_timestamps2.ts) DESC NULLS FIRST]
43964396
physical_plan
43974397
01)SortPreservingMergeExec: [name@0 DESC, time_chunks@1 DESC], fetch=5
43984398
02)--ProjectionExec: expr=[name@0 as name, date_bin(IntervalMonthDayNano { months: 0, days: 0, nanoseconds: 900000000000 }, ts@1) as time_chunks]

datafusion/sqllogictest/test_files/insert.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ logical_plan
215215
01)Dml: op=[Insert Into] table=[table_without_values]
216216
02)--Projection: aggregate_test_100.c1 AS c1
217217
03)----Sort: aggregate_test_100.c1 ASC NULLS LAST
218-
04)------TableScan: aggregate_test_100 projection=[c1]
218+
04)------TableScan: aggregate_test_100 projection=[c1] preferred_ordering=[aggregate_test_100.c1 ASC NULLS LAST]
219219
physical_plan
220220
01)DataSinkExec: sink=MemoryTable (partitions=1)
221221
02)--SortExec: expr=[c1@0 ASC NULLS LAST], preserve_partitioning=[false]

datafusion/sqllogictest/test_files/insert_to_external.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ logical_plan
521521
01)Dml: op=[Insert Into] table=[table_without_values]
522522
02)--Projection: aggregate_test_100.c1 AS c1
523523
03)----Sort: aggregate_test_100.c1 ASC NULLS LAST
524-
04)------TableScan: aggregate_test_100 projection=[c1]
524+
04)------TableScan: aggregate_test_100 projection=[c1] preferred_ordering=[aggregate_test_100.c1 ASC NULLS LAST]
525525
physical_plan
526526
01)DataSinkExec: sink=ParquetSink(file_groups=[])
527527
02)--SortExec: expr=[c1@0 ASC NULLS LAST], preserve_partitioning=[false]

datafusion/sqllogictest/test_files/joins.slt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3890,7 +3890,7 @@ logical_plan
38903890
03)----TableScan: left_table_no_nulls projection=[a, b]
38913891
04)--SubqueryAlias: rhs
38923892
05)----Sort: right_table_no_nulls.b ASC NULLS LAST, fetch=10
3893-
06)------TableScan: right_table_no_nulls projection=[a, b]
3893+
06)------TableScan: right_table_no_nulls projection=[a, b] preferred_ordering=[right_table_no_nulls.b ASC NULLS LAST]
38943894
physical_plan
38953895
01)ProjectionExec: expr=[a@2 as a, b@3 as b, a@0 as a, b@1 as b]
38963896
02)--CoalesceBatchesExec: target_batch_size=3
@@ -4008,7 +4008,7 @@ logical_plan
40084008
03)----TableScan: left_table_no_nulls projection=[a, b]
40094009
04)--SubqueryAlias: rhs
40104010
05)----Sort: right_table_no_nulls.b ASC NULLS LAST, fetch=10
4011-
06)------TableScan: right_table_no_nulls projection=[a, b]
4011+
06)------TableScan: right_table_no_nulls projection=[a, b] preferred_ordering=[right_table_no_nulls.b ASC NULLS LAST]
40124012
physical_plan
40134013
01)ProjectionExec: expr=[a@2 as a, b@3 as b, a@0 as a, b@1 as b]
40144014
02)--CoalesceBatchesExec: target_batch_size=3

datafusion/sqllogictest/test_files/limit.slt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ explain SELECT * FROM data ORDER BY column1 LIMIT 3,3;
562562
logical_plan
563563
01)Limit: skip=3, fetch=3
564564
02)--Sort: data.column1 ASC NULLS LAST, fetch=6
565-
03)----TableScan: data projection=[column1, column2]
565+
03)----TableScan: data projection=[column1, column2] preferred_ordering=[data.column1 ASC NULLS LAST]
566566
physical_plan
567567
01)GlobalLimitExec: skip=3, fetch=3
568568
02)--StreamingTableExec: partition_sizes=1, projection=[column1, column2], infinite_source=true, fetch=6, output_ordering=[column1@0 ASC NULLS LAST, column2@1 ASC NULLS LAST]
@@ -848,7 +848,7 @@ logical_plan
848848
03)----Projection: Int64(1) AS foo, selection.part_key
849849
04)------SubqueryAlias: selection
850850
05)--------Sort: test_limit_with_partitions.part_key ASC NULLS LAST, fetch=1
851-
06)----------TableScan: test_limit_with_partitions projection=[part_key]
851+
06)----------TableScan: test_limit_with_partitions projection=[part_key] preferred_ordering=[test_limit_with_partitions.part_key ASC NULLS LAST]
852852
physical_plan
853853
01)ProjectionExec: expr=[1 as foo]
854854
02)--SortPreservingMergeExec: [part_key@0 ASC NULLS LAST], fetch=1

0 commit comments

Comments
 (0)