kevinjqliu commented on issue #3840:
URL: 
https://github.com/apache/iceberg-python/issues/3840#issuecomment-5481182323

   I took a look at this in depth. We are in fact using `long` type for 
`equality_ids` which contradicts the spec. The good thing is, we dont write 
`equality_ids` yet, so only the schema is wrong. And it looks like the java 
implementation can tolerate this difference in schema (which is why we didnt 
catch it in the first place). Cpp's validation is stricter so this was caught. 
   
   I think the best way to fix forward is
   1. change `equality_ids` to `int` so we stop producing wrong schema 
   2. allow pyiceberg to tolerate `equality_ids` with `long`. this will allow 
us to read back avro files already written
   3. implement `rewrite_manifest` so that users can correct the avro files. 
this will write the correct schema and allow Cpp reader to work
   
   I considered adding this quirk to the spec's implementation note, but i 
think its best if we just handle this internally in pyiceberg and not burden 
every implementation with this caveat. 
   
   


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