gengliangwang commented on code in PR #36475:
URL: https://github.com/apache/spark/pull/36475#discussion_r875970670


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDefaultColumns.scala:
##########
@@ -522,6 +523,20 @@ case class ResolveDefaultColumns(
       case _ => return None
     }
     val lookup: LogicalPlan = try {
+      // Check if the target table has "ACCEPT_ANY_SCHEMA" capabilities and if 
so,
+      // don't do anything.
+      analyzer.currentCatalog match {

Review Comment:
   Shall we match if `source` is `DataSourceV2Relation` instead? With multiple 
catalog supports, the current catalog doesn't have to be the catalog of 
`source`.
   For example:
   ```
   set catalog catalog_a
   insert into catalog_b.db.tableName
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to