kosiew opened a new issue, #20163:
URL: https://github.com/apache/datafusion/issues/20163

   ## Summary
   
   Wire `CastColumnExpr` into `PhysicalExprAdapter` to emit struct-aware cast 
expressions during physical plan adaptation. Update optimizer and pruning rules 
as needed.
   
   ## Scope
   
   Complete the integration of `CastColumnExpr` into the adapter's rewrite 
pipeline, ensuring struct fields are correctly cast and metadata is propagated.
   
   ### Tasks
   
   - [ ] Update `PhysicalExprAdapter` to emit `CastColumnExpr` (instead of 
current fallback logic)
   - [ ] Integrate with schema rewriter refactoring from ISSUE_01
   - [ ] Update optimizer rules to handle `CastColumnExpr` (if needed)
   - [ ] Update partition pruning to account for `CastColumnExpr` (if needed)
   - [ ] Add focused behavior tests validating adapter + cast interaction
   - [ ] Smoke test with struct projection and filtering queries
   
   ### Files/Modules
   
   - `datafusion/physical-expr-adapter/src/schema_rewriter.rs` (primary 
integration point)
   - `datafusion/optimizer/` (rules that touch expressions)
   - `datafusion/pruning/` (partition pruning rules)
   - Focused integration tests
   
   ### Key Behaviors
   
   - **Struct projection:** Correctly adapt struct fields to target schema
   - **Nullability propagation:** Field nullability matches target schema
   - **Partition pruning:** Works correctly with adapted cast expressions
   - **Plan optimization:** Optimizer rules don't break on `CastColumnExpr`
   
   ### Acceptance Criteria
   
   ✅ Adapter emits `CastColumnExpr` for schema mismatches  
   ✅ Struct field casting works end-to-end  
   ✅ Optimizer and pruning rules pass all existing tests  
   ✅ New behavior tests validate adapter + cast interaction  
   ✅ Code compiles without warnings  
   
   


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