Skip to content

Commit a26c49e

Browse files
committed
test: update test once bug fix is complete
1 parent fb75fbc commit a26c49e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

datafusion/sqllogictest/test_files/order.slt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,16 +1216,27 @@ logical_plan
12161216
07)------SubqueryAlias: t2
12171217
08)--------Projection: ordered_table.b, ordered_table.c, Int32(NULL) AS a, ordered_table.a0, ordered_table.d
12181218
09)----------TableScan: ordered_table projection=[a0, b, c, d]
1219+
physical_plan
1220+
01)ProjectionExec: expr=[b@0 as b, c@1 as c, a@2 as a, a0@3 as a0]
1221+
02)--SortPreservingMergeExec: [d@4 ASC NULLS LAST,c@1 ASC NULLS LAST,a@2 ASC NULLS LAST,a0@3 ASC NULLS LAST,b@0 ASC NULLS LAST], fetch=2
1222+
03)----UnionExec
1223+
04)------SortExec: TopK(fetch=2), expr=[d@4 ASC NULLS LAST,c@1 ASC NULLS LAST,a@2 ASC NULLS LAST,b@0 ASC NULLS LAST], preserve_partitioning=[false]
1224+
05)--------ProjectionExec: expr=[b@1 as b, c@2 as c, a@0 as a, NULL as a0, d@3 as d]
1225+
06)----------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[a, b, c, d], output_ordering=[c@2 ASC NULLS LAST], has_header=true
1226+
07)------SortExec: TopK(fetch=2), expr=[d@4 ASC NULLS LAST,c@1 ASC NULLS LAST,a0@3 ASC NULLS LAST,b@0 ASC NULLS LAST], preserve_partitioning=[false]
1227+
08)--------ProjectionExec: expr=[b@1 as b, c@2 as c, NULL as a, a0@0 as a0, d@3 as d]
1228+
09)----------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/window_2.csv]]}, projection=[a0, b, c, d], output_ordering=[c@2 ASC NULLS LAST], has_header=true
12191229

12201230
# Test: run the query from above
1221-
# TODO: query fails since the constant columns t1.a0 and t2.a are not in the ORDER BY subquery,
1222-
# and SanityCheckPlan does not allow this.
1223-
statement error DataFusion error: SanityCheckPlan
1231+
query IIII
12241232
select * from (select b, c, a, NULL::int as a0 from ordered_table order by a, c) t1
12251233
union all
12261234
select * from (select b, c, NULL::int as a, a0 from ordered_table order by a0, c) t2
12271235
order by d, c, a, a0, b
12281236
limit 2;
1237+
----
1238+
0 0 0 NULL
1239+
0 0 NULL 1
12291240

12301241
statement ok
12311242
drop table ordered_table;

0 commit comments

Comments
 (0)