bryanck commented on code in PR #17499:
URL: https://github.com/apache/iceberg/pull/17499#discussion_r3754542224


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkSQLProperties.java:
##########
@@ -134,4 +134,17 @@ private SparkSQLProperties() {}
   // This determines how many rows are buffered before inferring shredded 
schema
   public static final String VARIANT_INFERENCE_BUFFER_SIZE =
       "spark.sql.iceberg.variant-inference-buffer-size";
+
+  // Controls how a view's stored schema is applied to the columns its SQL 
produces. The modes and
+  // their coercions match Spark's ViewSchemaMode, which only applies to 
Spark's own views.
+  // BINDING permits only widening casts, so stored-vs-query type drift fails 
resolution.
+  // COMPENSATION permits any ANSI cast, which can truncate values or fail at 
runtime.
+  // TYPE_EVOLUTION applies no cast, so the view reports the types its SQL 
produces.
+  // When unset, Spark's spark.sql.legacy.viewSchemaBindingMode and
+  // spark.sql.legacy.viewSchemaCompensation are honored instead; neither can 
select TYPE_EVOLUTION.
+  public static final String VIEW_SCHEMA_BINDING_MODE =
+      "spark.sql.iceberg.view.schema-binding-mode";

Review Comment:
   This property should be added to the docs.



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