kasakrisz commented on PR #5262:
URL: https://github.com/apache/hive/pull/5262#issuecomment-3044232002

   > hi @kasakrisz, could you please +1? 
[apache/calcite#4448](https://github.com/apache/calcite/pull/4448) is already 
merged. Once it is released, we could try replacing the whole 
`HiveAggregateReduceFunctionsRule`
   
   Currently we have vectorized implementation of the `Sum` function only but 
not the `Sum0` function.
   
https://github.com/apache/hive/blob/master/ql/src/gen/vectorization/UDAFTemplates/VectorUDAFSum.txt
   
   `VectorUDAFSum0` is required to use `AggregateReduceFunctionsRule` shipped 
with Calcite
   
https://github.com/apache/calcite/blob/e536d3949674cbbc0fd1162b3fccb211ca75789b/core/src/main/java/org/apache/calcite/rel/rules/AggregateReduceFunctionsRule.java#L289-L292
   
   In `HiveAggregateReduceFunctionsRule` we actually do the opposite: convert 
`sum0` to `sum` in order to exploit vectorization
   
https://github.com/apache/hive/blob/1a7fbd7183554f9ace10fbf7d066677eff0447a7/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveAggregateReduceFunctionsRule.java#L213-L215
   


-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to