xiedeyantu commented on code in PR #5089:
URL: https://github.com/apache/calcite/pull/5089#discussion_r3621165925


##########
core/src/test/resources/sql/sort.iq:
##########
@@ -568,4 +568,20 @@ order by all;
 
 !ok
 
+# [CALCITE-7647] Support SELECT * in GROUP BY ALL and ORDER BY ALL.
+# ORDER BY ALL expands SELECT * to every underlying column.
+# Expected output validated against DuckDB (https://shell.duckdb.org).

Review Comment:
   We can keep this in the PR; let's not put it in the test file.



##########
core/src/test/resources/sql/sort.iq:
##########
@@ -568,4 +568,20 @@ order by all;
 
 !ok
 
+# [CALCITE-7647] Support SELECT * in GROUP BY ALL and ORDER BY ALL.
+# ORDER BY ALL expands SELECT * to every underlying column.
+# Expected output validated against DuckDB (https://shell.duckdb.org).
+select * from (values (2, 'b'), (1, 'a'), (1, 'c')) as t(x, y)
+order by all;
++---+---+
+| X | Y |
++---+---+
+| 1 | a |
+| 1 | c |
+| 2 | b |
++---+---+
+(3 rows)
+
+!ok

Review Comment:
   Could you add a test case involving duplicate columns? For example, `SELECT 
*, deptno FROM emp GROUP BY ALL`, or perhaps some other edge cases?



-- 
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]

Reply via email to