mihirsamdarshi opened a new issue, #13667:
URL: https://github.com/apache/iceberg/issues/13667

   ### Apache Iceberg version
   
   1.9.2 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Hi, I have noticed a potential issue when using the `add_files` procedure.
   
   When using this procedure, manifest files set the `format-version` header to 
1, despite creating the table with (and the metadata JSON file stating that) 
the `format-version` should be 2.
   
   I've been documenting this issue in the duckdb/duckdb-iceberg#374 
repository, since DuckDB is unable to read manifest files that contain 
different `format-version`s from their metadata JSON files. This behavior 
throws an error, since the `content` field of the `data_file` struct is missing 
in all records in the manifest.
   
   I believe that this occurs in the `add_files` procedure. I was tracing down 
serialization of the output Avro manifest file, and noticed that the `content` 
field was optional in the `DataFile` interface:
   
   
https://github.com/apache/iceberg/blob/f25e07db6318184272d5c98dede4d268ee5288ab/api/src/main/java/org/apache/iceberg/DataFile.java#L37-L42
   
   I also noticed that there is no version dependent logic in constructing the 
DataFiles:
   
   
https://github.com/apache/iceberg/blob/799925a4ef41e7b4231930377b83bd686001c2c0/data/src/main/java/org/apache/iceberg/data/TableMigrationUtil.java#L191
   
   Or serializing them:
   
   
https://github.com/apache/iceberg/blob/54a62aeb14155c2c82a9008d9e2679646c2d703a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java#L804-L807
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [x] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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