szlta commented on code in PR #4560:
URL: https://github.com/apache/iceberg/pull/4560#discussion_r853254883
##########
core/src/main/java/org/apache/iceberg/PartitionsTable.java:
##########
@@ -93,16 +93,36 @@ 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);
- PartitionMap partitions = new
PartitionMap(scan.table().spec().partitionType());
+ PartitionMap partitions = new
PartitionMap(Partitioning.partitionType(table));
for (FileScanTask task : tasks) {
- partitions.get(task.file().partition()).update(task.file());
+ PartitionData original = (PartitionData) task.file().partition();
+ PartitionData normalized = normalizePartition(original,
Partitioning.partitionType(table));
Review Comment:
Should we reuse the result of the Partitioning.partitionType(table)
invocation at line 99 rather than calling it in every iteration?
--
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]