szehon-ho commented on code in PR #53360:
URL: https://github.com/apache/spark/pull/53360#discussion_r2615052048


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AssignmentUtils.scala:
##########
@@ -204,14 +228,71 @@ object AssignmentUtils extends SQLConfHelper with 
CastSupport {
         }
         val updatedFieldExprs = fieldAttrs.zip(fieldExprs).map { case 
(fieldAttr, fieldExpr) =>
           applyAssignments(fieldAttr, fieldExpr, assignments, addError, 
colPath :+ fieldAttr.name,
-            coerceNestedTypes)
+            coerceNestedTyptes)
+        }
+        toNamedStruct(structType, updatedFieldExprs)
+
+      case otherType =>
+        addError(
+          "Updating nested fields is only supported for StructType but " +
+            s"'${colPath.quoted}' is of type $otherType")
+        colExpr
+    }
+  }
+
+  private def applyNestedFieldAssignments(

Review Comment:
   iiuc, it is not , it just looks at missing assignments for the first level 
of schema and does some validation, and then uses TableOutputResolver to fill 
them



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

Reply via email to