alamb commented on issue #8738:
URL: 
https://github.com/apache/arrow-datafusion/issues/8738#issuecomment-1879051362

   I have spent some more time studying the code. 
   
   There **is** coercion logic to handle Union inputs to they have the correct 
types (e.g. adding casts) but this happens at the `LogicalPlan` level, not the 
`ExecutionPlan` level. By the time the `ExecutionPlan` is made, the types are 
expected to be the same 
   
   One potential source of problems is that `LogicalPlan::Aggregate` no longer 
accurately reflects the output type that the `ExecutionPlan` generates  (aka 
planning a `LogicalPlan::Aggregate` can now result in an `ExecutionPlan` with a 
different schema)
   
   I started  trying locally to make `LogicalPlan::Aggregate` reflect the fact 
that group exprs are dictionary uncompressed but hit a few potential problems:
   1. Some optimizer passes now error
   2. I need to verify that all potential ExecutonPlan nodes for a 
LogicalPlan::Aggregate do the same decompression of Dictionaries on groupign


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