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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -1700,6 +1700,21 @@ object SQLConf {
     .booleanConf
     .createWithDefault(true)
 
+  val VIEW_SCHEMA_BINDING = buildConf("spark.sql.defaultViewSchemaBinding")
+    .doc("Control the default behavior of views when the underlying schema 
changes. " +
+      "Valid values are: " +
+      "'BINDING': Safe casts only. " +

Review Comment:
   Reducing it to three is hard:
   * UNSUPPORTED we need to switch of the feature, including dumping at 
DESCRIBE EXTENDED, and not storing anything fr new views.
   * BINDING is the current default
   * COMPENSATION is the new default we have been drifting towards (see changes 
to DECIMAL (done), and STRUCT (proposed)).
   * That only leaves TYPE EVOLUTION vs EVOLUTION.
   Slim pickings...
   
   What we could do is, support only the first three for config.
   So TYPE EVOLUTION and EVOLUTION is one you must state explicitly.
   We could be even more aggressive and say: UNSUPPORTED and COMPENSATION are 
the only options in config.
   
   Now, to the docs. The description on CREATE VIEW is more verbose. I could 
point there
   The way we (don't) document configs really discourages being verbose. After 
all SET -v is pretty much it. 
    



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