snuyanzin commented on code in PR #5081:
URL: https://github.com/apache/calcite/pull/5081#discussion_r3524886894


##########
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:
   didn't get what you mean by that, can you elaborate please?
   
   This is exactly the case covered by `testWindowOrderByExpression` in this PR



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