RussellSpitzer commented on code in PR #4560:
URL: https://github.com/apache/iceberg/pull/4560#discussion_r855524988
##########
core/src/main/java/org/apache/iceberg/PartitionsTable.java:
##########
@@ -93,16 +96,77 @@ private static StaticDataTask.Row
convertPartition(Partition partition) {
return StaticDataTask.Row.of(partition.key, partition.recordCount,
partition.fileCount, partition.specId);
}
- private static Iterable<Partition> partitions(StaticTableScan scan) {
+ private static Iterable<Partition> partitions(Table table, StaticTableScan
scan) {
CloseableIterable<FileScanTask> tasks = planFiles(scan);
+ Types.StructType normalizedPartitionType =
Partitioning.partitionType(table);
+ PartitionMap partitions = new PartitionMap();
+
+ LoadingCache<Integer, Integer[]> originalPartitionFieldPositionsBySpec =
Caffeine.newBuilder().build(specId ->
+ originalPositions(table, specId, normalizedPartitionType));
+ LoadingCache<Pair<PartitionData, Integer>, PartitionData>
normalizedPartitions = Caffeine.newBuilder().build(
Review Comment:
This I don't think is super important to cache since the getters and setters
are pretty fast and you have the integer mapping already. So I probably would
drop this.
--
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]