tisyabhatia commented on code in PR #5089:
URL: https://github.com/apache/calcite/pull/5089#discussion_r3581010037
##########
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:
Completed
##########
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:
Completed
--
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]