chenjian2664 commented on code in PR #13301:
URL: https://github.com/apache/iceberg/pull/13301#discussion_r2450033662


##########
core/src/main/java/org/apache/iceberg/SnapshotScan.java:
##########
@@ -79,6 +79,26 @@ protected ScanMetrics scanMetrics() {
     return scanMetrics;
   }
 
+  protected Map<Integer, PartitionSpec> specs() {
+    Map<Integer, PartitionSpec> specs = table().specs();
+    // requires latest schema
+    if (!useSnapshotSchema()
+        || snapshotId() == null
+        || table().currentSnapshot() == null
+        || snapshotId().equals(table().currentSnapshot().snapshotId())) {
+      return specs;
+    }
+
+    // this is a time travel request
+    Schema snapshotSchema = tableSchema();
+    Map<Integer, PartitionSpec> newSpecs = 
Maps.newHashMapWithExpectedSize(specs.size());

Review Comment:
   Thanks @ebyhr @pvary 
   I updated to use `Collections.unmodifiableMap(newSpecs)` for consistency 
with other usages



-- 
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]

Reply via email to