wiedld opened a new pull request, #12954:
URL: https://github.com/apache/datafusion/pull/12954

   ## Which issue does this PR close?
   
   Part of #12733 
   
   ## Rationale for this change
   
   We found another bug for when the logical vs physical schema does not match. 
In this specific case, the UNION schema will [select which side has the 
nullable field -- and default to taking the left 
side](https://github.com/apache/datafusion/blob/5a0ea0bbad3de73ded192bf32080094cee5db9f3/datafusion/physical-plan/src/union.rs#L491).
   
   In the example case, we have the nullable field as the right side. With this 
setup, it became evident that we are not adding the field metadata from the 
left side => to the right side.
   
   ## What changes are included in this PR?
   
   [First 
commit](https://github.com/apache/datafusion/commit/a9b6bd56ed10ac23585d1010c923e5c457525274)
 is the reproducer.
   Second commit is the fix.
   Third commit updates the test/reproducer now that the fix is in.
   
   
   ## Are these changes tested?
   
   Yes.
   
   ## Are there any user-facing changes?
   
   No.
   


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