jayzhan211 commented on code in PR #15090: URL: https://github.com/apache/datafusion/pull/15090#discussion_r1986194642
########## datafusion/sqllogictest/test_files/order.slt: ########## @@ -985,13 +985,20 @@ drop table ambiguity_test; statement ok create table t(a0 int, a int, b int, c int) as values (1, 2, 3, 4), (5, 6, 7, 8); -# expect this query to run successfully, not error -query III +# b is not selected in subquery +query error DataFusion error: Schema error: No field named b\. Valid fields are t1\.c, t1\.a, t1\.a0\. select * from (select c, a, NULL::int as a0 from t order by a, c) t1 union all select * from (select c, NULL::int as a, a0 from t order by a0, c) t2 order by c, a, a0, b Review Comment: This query is executable in `main`, but it is not because `b` is not in the subquery -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org