HonahX commented on code in PR #227:
URL: https://github.com/apache/iceberg-python/pull/227#discussion_r1432471641


##########
pyiceberg/io/pyarrow.py:
##########
@@ -154,10 +154,9 @@
 ONE_MEGABYTE = 1024 * 1024
 BUFFER_SIZE = "buffer-size"
 ICEBERG_SCHEMA = b"iceberg.schema"
-FIELD_ID = "field_id"
-DOC = "doc"
-PYARROW_FIELD_ID_KEYS = [b"PARQUET:field_id", b"field_id"]
-PYARROW_FIELD_DOC_KEYS = [b"PARQUET:field_doc", b"field_doc", b"doc"]
+# The PARQUET: in front means that it is Parquet specific, in this case the 
field_id
+PYARROW_FIELD_ID_KEY = b"PARQUET:field_id"

Review Comment:
   Shall we name it as `PYARROW_PARQUET_FIELD_ID_KEY` since it is parquet 
specific? If we add ORC Fileformat support 
later(https://github.com/apache/iceberg-python/issues/20), we may want a 
`PYARROW_ORC_FIELD_ID_KEY = b"iceberg.id"` since the physical schema of ORC 
looks like
   ```
   user_id: int32
     -- field metadata --
     iceberg.id: '1'
     iceberg.required: 'false'
   user_name: string
     -- field metadata --
     iceberg.id: '2'
     iceberg.required: 'false'
   status: string
     -- field metadata --
     iceberg.id: '3'
     iceberg.required: 'false'
   cost: double
     -- field metadata --
     iceberg.id: '4'
   ...
   ```



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