Github user DonnyZone commented on a diff in the pull request:
https://github.com/apache/spark/pull/19178#discussion_r137979887
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -1115,6 +1115,8 @@ class Analyzer(
g.copy(join = true, child = addMissingAttr(g.child, missing))
case d: Distinct =>
throw new AnalysisException(s"Can't add $missingAttrs to $d")
+ case u: Union =>
+ u.withNewChildren(u.children.map(addMissingAttr(_,
missingAttrs)))
--- End diff --
Yeah, I agree with you. Current implementation only checks UnaryNode.
It is necessary to take all node types into consideration.
Thanks for suggestion, I will work on a general solution.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]