rdblue commented on code in PR #5672:
URL: https://github.com/apache/iceberg/pull/5672#discussion_r962039927
##########
python/pyiceberg/table/partitioning.py:
##########
@@ -178,4 +176,10 @@ def assign_fresh_partition_spec_ids(spec: PartitionSpec,
old_schema: Schema, fre
transform=field.transform,
)
)
- return PartitionSpec(INITIAL_SPEC_ID, fields=tuple(partition_fields))
+ if len(spec.fields) > 0:
+ return PartitionSpec(*partition_fields,
spec_id=INITIAL_PARTITION_SPEC_ID)
+ return UNPARTITIONED_PARTITION_SPEC
+
+
+UNPARTITIONED_PARTITION_SPEC_ID = 0
Review Comment:
I don't think we should have this constant, since we can't rely on it.
--
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]