zeroshade commented on code in PR #468:
URL: https://github.com/apache/iceberg-go/pull/468#discussion_r2175541974


##########
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:
   Looking at the rest of the Java implementation, it looks like it only uses 
the generated name like this if `field.Name` is empty. Should we add something 
like `if len(field.Name) > 0 { return field.Name, nil }` ? and have the tests 
leave out the Name member?



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