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