bhollis-dbx commented on code in PR #58753:
URL: https://github.com/apache/spark/pull/58753#discussion_r4007061483
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/DeduplicateRelations.scala:
##########
@@ -29,6 +29,13 @@ import org.apache.spark.sql.internal.SQLConf
object DeduplicateRelations extends Rule[LogicalPlan] {
type ExprIdMap = mutable.HashMap[Class[_], mutable.HashSet[Long]]
+ /** Renews `right` against expression IDs collected from `left`. */
+ private[sql] def deduplicateRight(left: LogicalPlan, right: LogicalPlan):
LogicalPlan = {
Review Comment:
Added nested Union coverage; direct renewal matches the synthetic self-join
path.
##########
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:
Documented the intentional left-to-right direction change 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]