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


##########
core/src/test/resources/sql/agg.iq:
##########
@@ -4298,4 +4298,74 @@ GROUP BY GROUPING SETS ((deptno), ());
 
 !ok
 
+# [CALCITE-5347] Add 'SELECT ... BY', a syntax extension that is shorthand for 
GROUP BY and ORDER BY

Review Comment:
   I used PostgreSQL as a result verification reference. The execution results 
of PostgreSQL are [here](https://onecompiler.com/postgresql/4472pjtxe); the 
link contains the execution results of each SQL statement in 
`RelToSqlConverterTest.testByClause()` within PostgreSQL.



##########
core/src/test/resources/sql/agg.iq:
##########
@@ -4181,9 +4181,9 @@ from emp group by deptno, sal_col;
 (12 rows)
 
 !ok
-EnumerableCalc(expr#0..8=[{inputs}], DEPTNO=[$t0], ENAME=[$t2], SAL_COL=[$t3], 
FULL_IDENTIFIER=[$t4], TWO_COLS_ONLY_ONE_IN_GROUP_BY=[$t5], 
SAL_PLUS_CONSTANT=[$t6], CONSTANT_3=[$t7], AGG_FUNC=[$t8])
-  EnumerableAggregate(group=[{0, 1}], ENAME=[ANY_VALUE($2)], 
SAL_COL=[ANY_VALUE($1)], FULL_IDENTIFIER=[ANY_VALUE($3)], 
TWO_COLS_ONLY_ONE_IN_GROUP_BY=[ANY_VALUE($4)], 
SAL_PLUS_CONSTANT=[ANY_VALUE($5)], CONSTANT_3=[ANY_VALUE($6)], 
AGG_FUNC=[MAX($1)])

Review Comment:
   Since `SAL_COL `is included in the `GROUP BY` clause, it cannot be wrapped 
in `ANY_VALUE` function.



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