adiranjan25 commented on issue #19273:
URL: https://github.com/apache/iceberg/issues/19273#issuecomment-7366045618

   I independently reproduced this issue on the current main branch using Spark 
3.5.
   
   The regression confirmed that historical rows returning the expected default 
value of `7` in the source table are silently read as `NULL` after snapshot.
   
   My investigation identified that `snapshot`, `migrate`, and catalog-based 
`add_files` share the `SparkTableUtil.importSparkTable()` import path.
   
   There is also a format compatibility consideration: Iceberg's non-null 
initial defaults require format version 3, while the default table format is 
version 2.
   
   I have implemented and locally validated a conservative fail-fast prototype 
that rejects imports involving Spark column default metadata rather than 
silently changing historical values.
   
   Validation so far:
   - Independently reproduced the original correctness failure.
   - Verified explicit rejection of the unsafe snapshot operation.
   - Verified destination table cleanup and preservation of source data.
   - Successfully executed the existing Spark 3.5 snapshot, migrate, and 
add_files procedure test suites.
   
   I am extending the regression coverage to the remaining affected operations.
   
   Would maintainers prefer an explicit rejection of unsupported 
default-bearing imports as an initial correctness safeguard, or a broader 
implementation that preserves compatible defaults for format-version 3 tables?
   
   I would appreciate feedback before extending the implementation across 
supported Spark versions.


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