galaxytemple commented on code in PR #27347:
URL: https://github.com/apache/datafusion/pull/27347#discussion_r4556477568
##########
datafusion/physical-expr/src/equivalence/properties/union.rs:
##########
@@ -104,6 +102,22 @@ pub fn calculate_union(
groupings.add_groupings(std::iter::once(grouping.iter().cloned()));
}
+ // An equality holds across the union only if it holds in every input
partition.
Review Comment:
Thanks for the catch and the concrete suggestion @jayzhan211!
I see, with 3 arms, the accumulator from the first two lost the equivalence
information, and broke folding with the third.
I've moved the logic into `calculate_union_binary` and added the test case
to `union.slt`.
--
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]