You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/06/07 02:57:17 UTC

[GitHub] [calcite] zinking commented on a change in pull request #2422: [CALCITE-4635] Distinct on aggregate window functions produce wrong r…

zinking commented on a change in pull request #2422:
URL: https://github.com/apache/calcite/pull/2422#discussion_r646241581



##########
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 believe there should be some symbol defined DISTINCT, and if you reverse the equals operation you could save the `null` comparison




-- 
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:
users@infra.apache.org