Skip to content

Commit c3a9408

Browse files
committed
Minor: Fix invalid query in test
1 parent 80cb0af commit c3a9408

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

datafusion/sqllogictest/test_files/order.slt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,17 +986,26 @@ statement ok
986986
create table t(a0 int, a int, b int, c int) as values (1, 2, 3, 4), (5, 6, 7, 8);
987987

988988
# expect this query to run successfully, not error
989+
query IIII
990+
select * from (select c, a, NULL::int as a0, b from t order by a, c) t1
991+
union all
992+
select * from (select c, NULL::int as a, a0, b from t order by a0, c) t2
993+
order by c, a, a0, b
994+
limit 2;
995+
----
996+
4 2 NULL 3
997+
4 NULL 1 3
998+
989999
query III
9901000
select * from (select c, a, NULL::int as a0 from t order by a, c) t1
9911001
union all
9921002
select * from (select c, NULL::int as a, a0 from t order by a0, c) t2
993-
order by c, a, a0, b
1003+
order by c, a, a0
9941004
limit 2;
9951005
----
9961006
4 2 NULL
9971007
4 NULL 1
9981008

999-
10001009
# Casting from numeric to string types breaks the ordering
10011010
statement ok
10021011
CREATE EXTERNAL TABLE ordered_table (

0 commit comments

Comments
 (0)