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


##########
core/src/main/java/org/apache/iceberg/AllManifestsTable.java:
##########
@@ -119,7 +119,7 @@ protected TableScan newRefinedScan(Table table, Schema 
schema, TableScanContext
     @Override
     protected CloseableIterable<FileScanTask> doPlanFiles() {
       FileIO io = table().io();
-      Map<Integer, PartitionSpec> specs = Maps.newHashMap(table().specs());
+      Map<Integer, PartitionSpec> specs = Maps.newHashMap(specs());

Review Comment:
   The new test passes without this change, right?



##########
core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java:
##########
@@ -113,4 +118,48 @@ public void testPartitionSourceRename() throws IOException 
{
 
     assertThat(tasks).hasSize(1);
   }
+
+  @TestTemplate
+  public void testColumnRenameOrDrop() throws IOException {
+    File location = Files.createTempDirectory(temp, "junit").toFile();
+    assertThat(location.delete()).isTrue(); // should be created by table 
create
+
+    Table table = TestTables.create(location, "test", SCHEMA, SPEC, 
formatVersion);
+
+    DataFile fileOne = createDataFile("one");
+    DataFile fileTwo = createDataFile("two");
+
+    table.newAppend().appendFile(fileOne).appendFile(fileTwo).commit();
+    long firstSnapshotId = table.currentSnapshot().snapshotId();
+
+    table.updateSchema().renameColumn("data", "renamed_data").commit();

Review Comment:
   How about testing time travel after partition evolution too? 



##########
core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java:
##########
@@ -113,4 +118,48 @@ public void testPartitionSourceRename() throws IOException 
{
 
     assertThat(tasks).hasSize(1);
   }
+
+  @TestTemplate
+  public void testColumnRenameOrDrop() throws IOException {
+    File location = Files.createTempDirectory(temp, "junit").toFile();
+    assertThat(location.delete()).isTrue(); // should be created by table 
create

Review Comment:
   nit: We could change `@TempDir` Path to File so we can remove this logic. 



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