a-rafay commented on a change in pull request #2423:
URL: https://github.com/apache/calcite/pull/2423#discussion_r646849314
##########
File path: core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
##########
@@ -5758,14 +5758,21 @@ private void translateAgg(SqlCall call, @Nullable
SqlNode filter,
if (orderList == null || orderList.size() == 0) {
collation = RelCollations.EMPTY;
} else {
- collation = RelCollations.of(
- orderList.stream()
- .map(order ->
- bb.convertSortExpression(order,
- RelFieldCollation.Direction.ASCENDING,
- RelFieldCollation.NullDirection.UNSPECIFIED,
- this::sortToFieldCollation))
- .collect(Collectors.toList()));
+ try {
+ // switch out of agg mode
+ bb.agg = null;
Review comment:
It must be equal to this class. If you scroll at the top of this
function, you'll see that. We also do something similar earlier in this
function as well.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]