amaliujia commented on code in PR #39451:
URL: https://github.com/apache/spark/pull/39451#discussion_r1064077597
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -1123,7 +1123,7 @@ class SparkConnectPlanner(session: SparkSession) {
val combinedUnion = CombineUnions(
Union(
Seq(transformRelation(u.getLeftInput),
transformRelation(u.getRightInput)),
- byName = u.getByName))
+ byName = u.getByName, allowMissingCol = u.getAllowMissingColumns))
Review Comment:
`assert(!allowMissingCol || byName, "`allowMissingCol` can be true only if
`byName` is true.")`
Union itself does the assert on this. Because it is an assert so I think we
should check here and throw proper exception back to client (so not depend on
the assert).
Please also consider adding a negative test case^.
--
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]