rdblue commented on a change in pull request #1919:
URL: https://github.com/apache/iceberg/pull/1919#discussion_r541474352
##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -480,9 +481,13 @@ Builder add(int sourceId, String name, String transform) {
Builder add(int sourceId, int fieldId, String name, String transform) {
Types.NestedField column = schema.findField(sourceId);
- checkAndAddPartitionName(name, column.fieldId());
Preconditions.checkNotNull(column, "Cannot find source column: %s",
sourceId);
- fields.add(new PartitionField(sourceId, fieldId, name,
Transforms.fromString(column.type(), transform)));
+ return add(sourceId, fieldId, name, Transforms.fromString(column.type(),
transform));
+ }
+
+ Builder add(int sourceId, int fieldId, String name, Transform<?, ?>
transform) {
Review comment:
Needed to add fields using `Transform`, not a string.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]