shrirangmhalgi commented on code in PR #58753:
URL: https://github.com/apache/spark/pull/58753#discussion_r3994520062
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/DeduplicateRelations.scala:
##########
@@ -67,24 +74,25 @@ object DeduplicateRelations extends Rule[LogicalPlan] {
DeduplicateUnionChildOutput.deduplicateOutputPerChild(u)
// Use projection-based de-duplication for Union to avoid breaking the
checkpoint sharing
// feature in streaming.
- val newChildren =
-
unionWithChildOutputsDeduplicated.children.foldRight(Seq.empty[LogicalPlan]) {
Review Comment:
nit: This changes the dedup direction from `foldRight` (last-child-wins) to
left-to-right (first-child-wins). The behavior is equivalent for correctness
but the set of branches getting Project wrappers is reversed. Might be worth a
one-line note in the PR description.
--
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]