comphead opened a new pull request, #25980:
URL: https://github.com/apache/datafusion/pull/25980

   ## Which issue does this PR close?
   
   - Part of #25758
   - Closes #25921 on `branch-55`.
   
   ## Rationale for this change
   
   Backport of #25922 to `branch-55`. Valid queries that sort by a struct field 
after a left join can fail physical plan validation (`SanityCheckPlan`) because 
a projection loses the equivalence between the field access and an extracted 
column. The failure reproduces on `branch-55`.
   
   ## What changes are included in this PR?
   
   A clean cherry-pick (`-x`) of #25922 with no conflicts. It reorders 
`EquivalenceGroup::project_expr_indirect` to rebuild an expression from its 
projected children before substituting an equivalent expression. It also adds 
the `joins.slt` regression tests.
   
   ## What is the testing strategy for this PR?
   
   On `branch-55`, the new `joins.slt` queries fail without the `class.rs` 
change and pass with it. The full sqllogictest suite, the 
`datafusion-physical-expr` and `datafusion-physical-plan` tests, the 
`physical_optimizer` tests and the equivalence fuzz tests also pass locally. 
`cargo fmt` and `cargo clippy` are clean for the changed crate.
   
   ## Are there any user-facing changes?
   
   Affected queries now execute instead of failing physical plan validation. No 
public API changes.
   


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