mihaibudiu commented on code in PR #5010:
URL: https://github.com/apache/calcite/pull/5010#discussion_r3391429214
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlInternalOperators.java:
##########
@@ -203,6 +203,17 @@ private SqlInternalOperators() {
public static final SqlInternalOperator GROUP_BY_DISTINCT =
new SqlRollupOperator("GROUP BY DISTINCT", SqlKind.GROUP_BY_DISTINCT);
+ /** {@code ORDER BY ALL}, a marker expanded during validation. */
Review Comment:
"marker"?
Maybe a place-holder operator which is expanded by the validator into a
standard ORDER BY.
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -5179,6 +5180,62 @@ protected void validateOrderList(SqlSelect select) {
}
}
+ protected void rewriteOrderByAll(SqlSelect select) {
Review Comment:
we have a conformance flag called `isSelectAlias` which is enabled in some
conformance levels, it would be nice to have some tests which exercise this
case too, assuming these two work correctly together.
##########
site/_docs/reference.md:
##########
@@ -395,6 +395,12 @@ in those same conformance levels, any *column* in *insert*
may be replaced by
In *orderItem*, if *expression* is a positive integer *n*, it denotes
the <em>n</em>th item in the SELECT clause.
+`ORDER BY ALL` sorts by every expression in the SELECT clause,
+in order; for example:
Review Comment:
in the order they appear in the list
--
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]