xiedeyantu commented on code in PR #5081:
URL: https://github.com/apache/calcite/pull/5081#discussion_r3524970967
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1061,7 +1061,8 @@ public List<SqlNode> toSql(Window.Group group,
ImmutableList<RexLiteral> constan
partitionKeys.add(this.field(partition));
}
for (RelFieldCollation collation : group.orderKeys.getFieldCollations())
{
- this.addOrderItem(orderByKeys, collation);
+ // A window ORDER BY has no ordinal notion; resolve via field().
+ this.addOrderItem(orderByKeys, collation, false);
Review Comment:
Oh, I see—regarding the `addOrderItem` method, you added a parameter called
`allowsOrdinal`. The `case` statement seems to cover the scenario where
`allowsOrdinal` is `true`; if I’m not mistaken, shouldn't there also be a case
for when it is `false`?
--
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]