Fokko commented on PR #121:
URL: https://github.com/apache/iceberg-cpp/pull/121#issuecomment-2958639839

   I think we should improve this in another way. I don't think we should set 
it to `-1` when it is missing:
   
   
https://github.com/apache/iceberg-cpp/blob/ed49d1e8f0dc31d99d4fff437a6c1583a0dfced5/src/iceberg/json_internal.cc#L675
   
   Instead, I would follow the same pattern as in Java. Where we assign them 
incrementally from 1000:
   
   
https://github.com/apache/iceberg/blob/7b8bd29ce80bc78ed882f0613f7570e78e325988/core/src/main/java/org/apache/iceberg/PartitionSpecParser.java#L137-L144
   
   This is also suggested by the spec:
   
   <img width="733" alt="image" 
src="https://github.com/user-attachments/assets/812d798c-e76c-472c-b40b-3739e8c42e0b";
 />
   
   In V1, it is not allowed to drop or re-order fields, so this will always be 
consistent:
   
   <img width="773" alt="image" 
src="https://github.com/user-attachments/assets/ff81c87b-2da4-4bc2-8449-7679f8881ae1";
 />
   


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to