cfmcgrady commented on a change in pull request #33040:
URL: https://github.com/apache/spark/pull/33040#discussion_r658109158



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveUnion.scala
##########
@@ -175,11 +102,9 @@ object ResolveUnion extends Rule[LogicalPlan] {
         (foundDt, lattr.dataType) match {
           case (source: StructType, target: StructType)
               if allowMissingCol && !source.sameType(target) =>
-            // Having an output with same name, but different struct type.
-            // We need to add missing fields. Note that if there are deeply 
nested structs such as
-            // nested struct of array in struct, we don't support to add 
missing deeply nested field
-            // like that. We will sort columns in the struct expression to 
make sure two sides of
-            // union have consistent schema.
+            // We have two structs with different types, so make sure the two 
structs have their
+            // fields in the same order by using `target`'s fields and then 
inluding any remaining

Review comment:
       nit: `inluding` -> `including`




-- 
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]

Reply via email to