syun64 commented on PR #219:
URL: https://github.com/apache/iceberg-python/pull/219#issuecomment-1863321308

   I've discussed extensively with @fokko regarding how we'd like to handle the 
edge cases, and here's the summary of the logic that I've implemented in the 
current version:
   
   1. HasIds first checks if ANY of the field IDs are missing in the file.
   2. If HasIds, ConvertToIceberg without name mapping. If any of the fields 
doesn't have a Type, we throw a ValueError
   3. Else if NameMapping is specified on the table property, ConvertToIceberg 
with name mapping.
   4. If any of the field IDs present in the file are missing from the 
NameMapping, ValueError is thrown
   5. If table does not have IDs (1) and name_mapping is also not provided, we 
throw a ValueError with a specific exception message: 
https://github.com/apache/iceberg-python/pull/219/files#diff-8d5e63f2a87ead8cebe2fd8ac5dcf2198d229f01e16bb9e06e21f7277c328abdR634


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