Skip to content

Teach physical-expression utilities about CastColumnExpr #17761

@kosiew

Description

@kosiew

2. Teach physical-expression utilities about CastColumnExpr

  • Goal: Ensure all helper subsystems that reason about expressions understand the new node before other components depend on it.

  • Scope & Location: datafusion/physical-expr-common, physical-expr optimizers/utilities, plus associated tests.

  • Key Tasks:

    • Extend equivalence tracking to treat CastColumnExpr similarly to other projection expressions when comparing canonical forms.
    • Update interval propagation / ordering analysis to either unwrap or conservatively handle CastColumnExpr.
    • Teach cast-unwrapping simplifications (strip_aliases, strip_nullability_casts, etc.) to recognize when a CastColumnExpr can be bypassed (or confirm it must stay).
    • Add regression tests for each utility verifying expected behavior with the new node.
  • Dependencies: Builds on spec Add a dedicated physical expression for struct-aware casting that mirrors the existing cast_column helper semantics. #17760 (expression must exist).

  • Out of Scope: Planner adapters and serialization changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions