pgaref commented on pull request #2616:
URL: https://github.com/apache/hive/pull/2616#issuecomment-915356626


   > @ujc714
   > With this patch the maximum number of `count(distinct)` expressions can be 
handled by the `HiveExpandDistinctAggregatesRule` is increased to 63 from 31. 
But this limitation still exists. Could you please add a check here:
   > 
https://github.com/apache/hive/blob/72d860ad7721e705c830ca5f141a79e899cc86f7/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExpandDistinctAggregatesRule.java#L115
   > 
   > like
   > 
   > ```
   >   if (numCountDistinct == 0 || numCountDistinct > 63 || 
aggregate.getGroupType() != Group.SIMPLE) {
   >       return;
   >   }
   > ```
   
   Agree with @kasakrisz -- an alternative would be to change 
**getGroupingIdValue** logic but that could be tricky.
   At the end of the day we should not be limited by the number of count 
distinct functions so having this extra check as part of the onMatch method 
makes sense to me.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to