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:29:29 UTC
[I] CastColumnExpr Core Functionality [datafusion]
kosiew opened a new issue, #20162:
URL: https://github.com/apache/datafusion/issues/20162
Implement `CastColumnExpr` as a new physical expression variant with full validation, evaluation, and unit test coverage. This expression handles struct-aware casting, field-level nullability checks, and schema-aware type conversions.
## Scope
Introduce `CastColumnExpr` as a short-term solution to unblock `PhysicalExprAdapter`'s struct-casting requirements. This will later be converged into an enhanced `CastExpr`.
### Tasks
- [ ] Define `CastColumnExpr` struct in `datafusion/physical-expr/`
- [ ] Implement `PhysicalExpr` trait for `CastColumnExpr`
- [ ] Add evaluation logic (evaluate all rows + scalar evaluation)
- [ ] Implement nullability and schema inference
- [ ] Add comprehensive unit tests in `physical-expr`
- [ ] Document struct-aware casting behavior and limitations
### Files/Modules
- `datafusion/physical-expr/src/physical_expr.rs` (or dedicated module)
- `datafusion/physical-expr/src/cast.rs` (new or extended)
- Unit tests within the same crate
### Key Features
- **Struct-aware casting:** Support casting struct fields to target types
- **Field-level nullability:** Check and propagate nullability metadata
- **Schema validation:** Validate target schema compatibility
- **Proper error handling:** Clear error messages for invalid casts
### Acceptance Criteria
✅ `CastColumnExpr` trait implementation is complete
✅ Evaluation logic handles all scalar and columnar inputs correctly
✅ Nullability inference reflects target schema
✅ Unit tests cover happy path, error cases, and edge cases
✅ 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] CastColumnExpr Core Functionality [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew closed issue #20162: CastColumnExpr Core Functionality
URL: https://github.com/apache/datafusion/issues/20162
--
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
Re: [I] CastColumnExpr Core Functionality [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #20162:
URL: https://github.com/apache/datafusion/issues/20162#issuecomment-5196614950
@kosiew can we close this since `CastColumnExpr` no longer exists?
--
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
Re: [I] CastColumnExpr Core Functionality [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on issue #20162:
URL: https://github.com/apache/datafusion/issues/20162#issuecomment-5200213806
@adriangb
Yes.
--
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