lliangyu-lin commented on code in PR #468:
URL: https://github.com/apache/iceberg-go/pull/468#discussion_r2175578401
##########
partitions.go:
##########
@@ -293,3 +293,27 @@ func AssignFreshPartitionSpecIDs(spec *PartitionSpec, old,
fresh *Schema) (Parti
return NewPartitionSpec(newFields...), nil
}
+
+// GeneratePartitionFieldName returns default partition field name based on
field transform type
+//
+// The default names are aligned with other client implementations
+//
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/BaseUpdatePartitionSpec.java#L518-L563
+func GeneratePartitionFieldName(schema *Schema, field PartitionField) (string,
error) {
Review Comment:
Based on other client implementations, I think the method should work for
both field with name and empty name?
In python implementation, it gets the partition field name with a tmp field
with name `unassigned_field_name`.
https://github.com/apache/iceberg-python/blob/main/pyiceberg/table/update/spec.py#L281-L282
Although I don't think there will be any issue if we check empty name inside
the method to limit the use case to empty name only as well. What do you think?
--
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]