mihaibudiu commented on code in PR #5089:
URL: https://github.com/apache/calcite/pull/5089#discussion_r3574417475
##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -7337,9 +7337,15 @@ public boolean isBangEqualAllowed() {
sql("select deptno, sal from emp order by all").ok();
// direction applies to every expanded key
sql("select deptno, sal from emp order by all desc").ok();
- // SELECT * can't be expanded here
- sql("select ^*^ from emp order by all")
- .fails("(?s).*ORDER BY ALL requires an explicit SELECT list.*");
+ // SELECT * is expanded to the underlying columns, each of which
+ // becomes a sort key
+ sql("select * from emp order by all").ok();
+ // SELECT * combined with a trailing direction
+ sql("select * from emp order by all desc").ok();
+ // Multiple qualified stars are expanded independently (no state leaks
Review Comment:
The comment claims more than this test is really verifying.
Can you write some tests that show the expanded columns (perhaps a plan in
the quidem tests?)
##########
core/src/test/resources/sql/sort.iq:
##########
@@ -563,4 +563,18 @@ order by all;
!ok
+# [CALCITE-7647] ORDER BY ALL expands SELECT * to every underlying column
Review Comment:
please add a comment that these were validated using duckdb
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]