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 07:47:48 UTC

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

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

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
 ##########
 @@ -110,6 +111,7 @@ private AggregateCall(SqlAggFunction aggFunction, boolean distinct,
   public static AggregateCall create(SqlAggFunction aggFunction,
       boolean distinct, List<Integer> argList, int groupCount, RelNode input,
       RelDataType type, String name) {
+    distinct = aggFunction.getDistinctOptionality() != Optionality.IGNORED && distinct;
 
 Review comment:
   Can we move this common logic into a method to make it more readable ?

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