alamb opened a new pull request, #26895: URL: https://github.com/apache/datafusion/pull/26895
## Which issue does this PR close? - Related to #24860 and #24865 ## Rationale for this change While reviewing #24865 I found that `coalesce`, `nvl`, `ifnull` and `nvl2` are rewritten to `CASE` during simplification, and `CASE` drops field metadata (including Arrow extension types) in both its logical output field and the physical `CaseExpr`. So propagating metadata in those functions' `return_field_from_args` does not reach query results. These tests document the current behavior end to end so a fix can be verified against them. ## What changes are included in this PR? New cases in `metadata.slt` for `coalesce`, `nvl`, `ifnull`, `nvl2` and `CASE`. Each query records what DataFusion returns today, with the intended result in a `# Expected` comment next to it. `arrow_metadata()` reads the physical field at execution time, so the tests observe the executed schema rather than the planned one. ## What is the testing strategy for this PR? Tests only. ## 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]
