RussellSpitzer commented on code in PR #10020: URL: https://github.com/apache/iceberg/pull/10020#discussion_r1593089972
########## 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: Looking into the code we don't have this, but it may be nice to just add a public withId(id) method? like the "asOptional" and "asRequired" methods -- 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