HonahX commented on code in PR #245:
URL: https://github.com/apache/iceberg-python/pull/245#discussion_r1498475605
##########
tests/catalog/test_hive.py:
##########
@@ -277,7 +277,7 @@ def test_create_table(table_schema_simple: Schema,
hive_database: HiveDatabase,
)
],
current_schema_id=0,
- last_partition_id=1000,
+ last_partition_id=999,
Review Comment:
I checked V2 unpartitioned table created by spark-iceberg-runtime and the
`last_partition_id` stored in the metadata is `999`.
<img width="494" alt="Screenshot 2024-02-21 at 16 27 58"
src="https://github.com/apache/iceberg-python/assets/140284484/67f38679-5aa1-4ce3-8f43-7e87e941f09d">
Therefore I suggested to update the `last_partition_id()` in pyiceberg to
align with the java implementation.
In general, I think `999` is spec compliant since it is for
`UnpartitionedSpec`, where there is no existing partition field. It implies
that 1000 will be the id for the first valid partition field and thus align
with the spec. Do these sound reasonable? Appreciate your thoughts on this!
--
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]