rdblue commented on code in PR #5672:
URL: https://github.com/apache/iceberg/pull/5672#discussion_r962039059


##########
python/pyiceberg/table/metadata.py:
##########
@@ -69,6 +73,12 @@ def check_partition_specs(values: Dict[str, Any]) -> 
Dict[str, Any]:
         if spec.spec_id == default_spec_id:
             return values
 
+    # When the table is unpartitioned, we just add the default spec
+    # This makes it optional when defining a table
+    if default_spec_id == UNPARTITIONED_PARTITION_SPEC_ID:

Review Comment:
   Unlike sort orders, we didn't reserve an ID for the unpartitioned spec. So 
unfortunately we can't use logic like this and add the spec. We also don't want 
to modify the table here.



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