Fokko commented on code in PR #7782:
URL: https://github.com/apache/iceberg/pull/7782#discussion_r1295085263


##########
python/pyiceberg/partitioning.py:
##########
@@ -23,15 +25,21 @@
     Tuple,
 )
 
-from pydantic import Field
+from pydantic import (
+    BeforeValidator,
+    Field,
+    PlainSerializer,
+    WithJsonSchema,
+)
+from typing_extensions import Annotated
 
 from pyiceberg.schema import Schema
-from pyiceberg.transforms import Transform
+from pyiceberg.transforms import Transform, _deserialize_transform
 from pyiceberg.typedef import IcebergBaseModel
 from pyiceberg.types import NestedField, StructType
 
 INITIAL_PARTITION_SPEC_ID = 0
-_PARTITION_DATA_ID_START: int = 1000
+PARTITION_FIELD_ID_START: int = 1000

Review Comment:
   When we read a V1 spec, we use this to set the `last-partition-id` on the 
metadata:
   ```
           data[LAST_PARTITION_ID] = max(
               [field.get(FIELD_ID) for spec in data[PARTITION_SPECS] for field 
in spec[FIELDS]], default=PARTITION_FIELD_ID_START
           )
   ```
   This is outside of the package, so I thought it would make sense to make 
public.



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