maropu commented on a change in pull request #29485:
URL: https://github.com/apache/spark/pull/29485#discussion_r478769321
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -123,6 +123,127 @@ object AnalysisContext {
}
}
+object Analyzer {
+
+ /**
+ * Rewrites a given `plan` recursively based on rewrite mappings from old
plans to new ones.
+ * This method also updates all the related references in the `plan`
accordingly.
+ *
+ * @param plan to rewrite
+ * @param rewritePlanMap has mappings from old plans to new ones for the
given `plan`.
+ * @return a rewritten plan and updated references related to a root node of
+ * the given `plan` for rewriting it.
+ */
+ def rewritePlan(plan: LogicalPlan, rewritePlanMap: Map[LogicalPlan,
LogicalPlan])
Review comment:
I rewrote the existing `rewritePlan` a bit, then just reused it for
`WidenSetOperationTypes `. Does this udpate satisfy your intention?
https://github.com/apache/spark/pull/29485#issuecomment-680673887
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]