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 2019/07/29 18:02:30 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #1335: [CALCITE-3159] Distinct can be removed for MIN/MAX/BIT_OR/BIT_AND agg…

julianhyde commented on a change in pull request #1335: [CALCITE-3159] Distinct can be removed for MIN/MAX/BIT_OR/BIT_AND agg…
URL: https://github.com/apache/calcite/pull/1335#discussion_r308358616
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
 ##########
 @@ -98,7 +99,7 @@ private AggregateCall(SqlAggFunction aggFunction, boolean distinct,
     this.argList = ImmutableList.copyOf(argList);
     this.filterArg = filterArg;
     this.collation = Objects.requireNonNull(collation);
-    this.distinct = distinct;
+    this.distinct = aggFunction.getDistinctOptionality() != Optionality.IGNORED && distinct;
 
 Review comment:
   Worth adding a comment to explain what is going on here.

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


With regards,
Apache Git Services