xiedeyantu commented on code in PR #4671:
URL: https://github.com/apache/calcite/pull/4671#discussion_r2609310193
##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -2969,26 +2971,62 @@ SqlNodeList OrderBy(boolean accept) :
throw SqlUtil.newContextException(s.pos(),
RESOURCE.illegalOrderBy());
}
}
- <BY> AddOrderItem(list)
- (
- // NOTE jvs 6-Feb-2004: See comments at top of file for why
- // hint is necessary here.
- LOOKAHEAD(2) <COMMA> AddOrderItem(list)
- )*
+ <BY> OrderItemList(list)
+ {
+ return new SqlNodeList(list, s.addAll(list).pos());
+ }
+}
+
+/**
+ * Parses a BY clause for SELECT (syntactic sugar for GROUP BY ... ORDER BY).
+ */
+SqlNodeList SqlSelectBy() :
Review Comment:
Should I also make this feature supported only in Babel?
--
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]