Fokko commented on code in PR #5672:
URL: https://github.com/apache/iceberg/pull/5672#discussion_r962363711
##########
python/pyiceberg/table/partitioning.py:
##########
@@ -82,19 +82,16 @@ class PartitionSpec(IcebergBaseModel):
fields(List[PartitionField): list of partition fields to produce
partition values
"""
- spec_id: int = Field(alias="spec-id")
- fields: Tuple[PartitionField, ...] = Field(default_factory=tuple)
+ spec_id: int = Field(alias="spec-id", default=INITIAL_PARTITION_SPEC_ID)
Review Comment:
I feel that we don't should really expose this to the user. For example,
when we create a new table, we re-assign the IDs anyway (using the assign fresh
IDs logic).
If we follow the Java API, and we have something similar to `updateSpec`:
https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/Table.java#L165-L171
Then we can just take the next ID. What do you think of 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]