You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "kosiew (via GitHub)" <gi...@apache.org> on 2026/02/05 08:33:19 UTC
[I] Integrate CastColumnExpr into PhysicalExprAdapter [datafusion]
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Integrate CastColumnExpr into PhysicalExprAdapter [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew closed issue #20163: Integrate CastColumnExpr into PhysicalExprAdapter
URL: https://github.com/apache/datafusion/issues/20163
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org