-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
6. Switch adapter to CastColumnExpr and add behavior tests
-
Goal: Make
PhysicalExprAdapterreuse the struct-aware casting path for schema mismatches and validate behavior end-to-end. -
Scope & Location:
schema_rewriter.rs, adapter integration tests, potentially shared test utilities. -
Key Tasks:
Replace the fallbackCastExprcreation withCastColumnExprinstantiation when rewriting columns.- update the existing CastExpr to handle Fields in place of CastColumnExpr - discussion
- Ensure new quick compatibility checks determine when no cast is necessary.
- Add integration-style tests covering predicates with missing struct fields, differing nullability, and nested structs to confirm correct coercion.
- Update any documentation or comments referencing the old behavior.
-
Dependencies: Requires specs Add a dedicated physical expression for struct-aware casting that mirrors the existing
cast_columnhelper semantics. #17760, Teach physical-expression utilities aboutCastColumnExpr#17761, Ensure plans containingCastColumnExprround-trip through protobuf for distributed execution. #17762, Update pruning to handleCastColumnExpr#17763, PreparePhysicalExprAdapterinternals for the final switch without changing external behavior. #17764 to be merged (expression, utilities, serialization, pruning, and refactor). -
Out of Scope: Additional optimizer/planner features beyond the adapter change.