alamb opened a new issue, #2447:
URL: https://github.com/apache/arrow-datafusion/issues/2447

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   There is casting logic in aggregates that handles coercing inputs to 
aggregates
   
   
https://github.com/apache/arrow-datafusion/blob/6b4bbd0/datafusion/physical-expr/src/aggregate/sum.rs#L224-L316
   
   On the surface doing these casts in `sum.rs` appears to duplicates some non 
trivial amount of the logic in plan timecoercion  -- maybe it would be possible 
to make this code cleaner / consolidate more of the coercion logic.
   
   
   **Describe the solution you'd like**
   Ensure types are known prior to executing the aggregate so that the input 
and aggregate types are known aprior
   
   **Describe alternatives you've considered**
   Not sure (maybe the code is needed, it just "feels" a bit wrong)
   
   **Additional context**
   
   https://github.com/apache/arrow-datafusion/pull/2405#discussion_r864400327
   cc @WinkerDu 


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

Reply via email to