RussellSpitzer commented on code in PR #10020: URL: https://github.com/apache/iceberg/pull/10020#discussion_r1593088012
########## api/src/main/java/org/apache/iceberg/PartitionSpec.java: ########## @@ -140,6 +141,31 @@ public StructType partitionType() { return lazyPartitionType; } + public StructType originalPartitionType() { + if (schema.idsToOriginal().size() == 0) { + return partitionType(); + } + if (lazyOriginalPartitionType == null) { + synchronized (this) { + if (lazyOriginalPartitionType == null) { + List<Types.NestedField> structFields = Lists.newArrayListWithExpectedSize(fields.length); + + for (PartitionField field : fields) { + Type sourceType = schema.findType(field.sourceId()); Review Comment: Do we not have a copy constructor here? Seems like we are doing a lot of lookups here for just reassigning the id. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org