rdblue commented on code in PR #5929:
URL: https://github.com/apache/iceberg/pull/5929#discussion_r990491655
##########
python/pyiceberg/table/partitioning.py:
##########
@@ -158,6 +158,29 @@ def compatible_with(self, other: "PartitionSpec") -> bool:
for this_field, that_field in zip(self.fields, other.fields)
)
+ def partition_type(self, schema: Schema) -> StructType:
+ """Produces a struct of the PartitionSpec
+
+ The partition fields should be optional:
+
+ - All partition transforms are required to produce null if the input
value is null, so it can
+ happen when the source column is optional
+ - Partition fields may be added later, in which case not all files
would have the result field,
+ and it may be null.
+
+ There is a case where we can guarantee that a partition field in the
first and only partition spec
Review Comment:
Minor: `we` used in documentation.
--
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]