James-Jeyun-Kim commented on a change in pull request #2422:
URL: https://github.com/apache/calcite/pull/2422#discussion_r646871084



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlOverOperator.java
##########
@@ -78,6 +78,12 @@ public SqlOverOperator() {
       throw validator.newValidationError(aggCall, RESOURCE.overNonAggregate());
     }
     final SqlNode window = call.operand(1);
+    SqlLiteral qualifier = aggCall.getFunctionQuantifier();
+    if (qualifier != null && qualifier.toString().equals("DISTINCT")

Review comment:
       I have changed it so that SqlSelectKeyword.DISTINCT is used instead of 
the literal "distinct". I still need to null check even with reversing of the 
equals operation since I would need to use qualifier.toString() or 
qualifier.getValue() and if qualifier is null it'll lead to NPE. Hence, I 
decided to keep it not-reversed for readability.




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


Reply via email to