szehon-ho opened a new pull request, #15825:
URL: https://github.com/apache/iceberg/pull/15825

   ## Summary
   - Add a new table property `write.spark.auto-schema-evolution` (default 
`true`) that controls whether the `AUTOMATIC_SCHEMA_EVOLUTION` capability is 
reported to Spark
   - When set to `false`, Spark's `MERGE WITH SCHEMA EVOLUTION` no longer 
evolves the target table schema — extra source columns are silently ignored
   - Also guard the `mergeSchema` write option in `SparkWriteBuilder` so that 
`df.writeTo().option("merge-schema", "true").append()` is also rejected when 
the property is disabled
   
   ## Test plan
   - [x] New test `testMergeWithSchemaEvolutionDisabledByTableProperty` 
verifies that with the property set to `false`, `MERGE WITH SCHEMA EVOLUTION` 
succeeds but the table schema is not evolved (no new `salary` column added)
   - [ ] Verify existing `TestMergeSchemaEvolution` tests still pass (default 
behavior unchanged)
   - [ ] Verify existing `TestDataFrameWriterV2` merge schema tests still pass


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