You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: Add a dedicated physical expression for struct-aware casting that mirrors the existing cast_column helper semantics.
Scope & Location: Implement in datafusion/physical-expr (expression definition, evaluation logic, scalar/array handling) and expose via the crate’s public API.
Key Tasks:
Define the CastColumnExpr struct with schema metadata (input field, target field) and implement PhysicalExpr.
Use datafusion_common::nested_struct::cast_column in evaluate for array and scalar cases, preserving nullability and field ordering.
Ensure type coercion rules and data_type / nullable methods reflect the target field accurately.
Add unit tests covering basic casts, missing child fields, null-padding, and nested structs.
Update documentation or module comments describing when to use CastColumnExpr.
Out of Scope: Any planner/optimizer integration, protobuf wiring, or schema-rewriter changes.