johanl-db commented on code in PR #58632:
URL: https://github.com/apache/spark/pull/58632#discussion_r4060128746


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala:
##########
@@ -354,8 +367,14 @@ object TableOutputResolver extends SQLConfHelper with 
Logging {
       byName: Boolean,
       conf: SQLConf,
       addError: String => Unit,
-      colPath: Seq[String]): Boolean = {
+      colPath: Seq[String],
+      deferCastValidationToRuntime: Boolean): Boolean = {
     conf.storeAssignmentPolicy match {
+      case StoreAssignmentPolicy.ANSI if deferCastValidationToRuntime =>

Review Comment:
   Good catch, I'm now threading the decision to `DataTypeUtils.canWrite` to 
only allow specific cases.
   E.p., struct field ordering and UDT validation are still enforced.
   
   I also added a number of tests to cover struct fields ordering, UDT, 
nullability



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