geruh opened a new pull request, #14407:
URL: https://github.com/apache/iceberg/pull/14407

   This PR adds support for default values in Spark. During the conversion of 
an Iceberg schema to Spark's StructType, default values are now passed through 
to Spark's column metadata using the `CURRENT_DEFAULT` and `EXISTS_DEFAULT` 
keys that Spark recognizes.
   
   The changes extend `TypeToSparkType()` function to extract default values 
from Iceberg fields and convert them to Spark SQL string representations, 
enabling Spark to understand and utilize the defaults that were defined in 
Iceberg.
   
   Tests for initial defaults weren't added here since that functionality 
already works without these changes. So I'll follow up with some to be added to 
this new test suite.
   
   
   Note: The current tests focus on default Write capabilities as partial 
column inserts for DSV2 tables aren't available until Spark 4.1.0 per 
https://github.com/apache/spark/pull/50044.


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