aokolnychyi commented on code in PR #53450:
URL: https://github.com/apache/spark/pull/53450#discussion_r2615126976


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/V2TableReference.scala:
##########
@@ -120,7 +121,10 @@ private[sql] object V2TableReferenceUtils extends 
SQLConfHelper {
       ctx: TemporaryViewContext): Unit = {
     val tableName = ref.identifier.toQualifiedNameParts(ref.catalog)
 
-    val dataErrors = V2TableUtil.validateCapturedColumns(table, 
ref.info.columns)
+    val dataErrors = V2TableUtil.validateCapturedColumns(
+      table,
+      ref.info.columns,
+      mode = ALLOW_NEW_TOP_LEVEL_FIELDS)

Review Comment:
   As of now, SQL views don't allow nested field additions, which I can 
somewhat justify. It will be quite a behavior change but I am OK with it as 
long as it behaves consistently across temp and SQL views.



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