srielau commented on code in PR #46267:
URL: https://github.com/apache/spark/pull/46267#discussion_r1591608406


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -401,6 +401,25 @@ case class CatalogTable(
     )
   }
 
+  /**
+   * Return the schema binding mode. Defaults to SchemaCompensation if not a 
view or an older
+   * version, unless the viewSchemaBinding config is set to UNSUPPORTED
+   */
+  def viewSchemaMode: ViewSchemaMode = {
+    if (SQLConf.get.viewSchemaBinding == "UNSUPPORTED") {
+      SchemaUnsupported
+    } else {
+      val schemaMode = properties.getOrElse(VIEW_SCHEMA_MODE, 
SchemaCompensation.toString)

Review Comment:
   I was considering that, but the case here is a view which predates the 
feature.
   So if we pick up the config we would have views which behavior changes based 
on a session config.
   That seems weird, even more so if they can refresh themselves.
   I'd rather keep the config to only affect CREATE  VIEW.



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