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


##########
core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java:
##########
@@ -182,4 +183,77 @@ public void testAddColumnWithDefaultValueAndQuery() throws 
IOException {
               
assertThat(categoryFieldInTask.writeDefault()).isEqualTo(defaultValue);
             });
   }
+
+  @TestTemplate
+  public void testAddColumnWithDefaultValueAndPartitionTransform() throws 
IOException {
+    assumeThat(V3_AND_ABOVE).as("Default values require 
v3+").contains(formatVersion);
+    File location = Files.createTempDirectory(temp, "junit").toFile();
+    assertThat(location.delete()).isTrue(); // should be created by table 
create

Review Comment:
   We don't need this logic once we change `Path temp` to `File` class, right? 
Relates to #13506
   ```diff
   diff --git 
core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java 
core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
   index 10e283cc6..790f7c715 100644
   --- core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
   +++ core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
   @@ -26,8 +26,6 @@ import static org.assertj.core.api.Assumptions.assumeThat;
    
    import java.io.File;
    import java.io.IOException;
   -import java.nio.file.Files;
   -import java.nio.file.Path;
    import java.util.List;
    import java.util.UUID;
    import org.apache.avro.generic.GenericData;
   @@ -64,7 +62,7 @@ public class TestScansAndSchemaEvolution {
    
      @Parameter private int formatVersion;
    
   -  @TempDir private Path temp;
   +  @TempDir private File temp;
    
      private DataFile createDataFile(String partValue) throws IOException {
        List<GenericData.Record> expected = RandomAvroData.generate(SCHEMA, 
100, 0L);
   @@ -95,10 +93,7 @@ public class TestScansAndSchemaEvolution {
    
      @TestTemplate
      public void testPartitionSourceRename() 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);
   +    Table table = TestTables.create(temp, "test", SCHEMA, SPEC, 
formatVersion);
    
        DataFile fileOne = createDataFile("one");
        DataFile fileTwo = createDataFile("two");
   @@ -121,10 +116,7 @@ public class TestScansAndSchemaEvolution {
      @TestTemplate
      public void testAddColumnWithDefaultValueAndQuery() throws IOException {
        assumeThat(V3_AND_ABOVE).as("Default values require 
v3+").contains(formatVersion);
   -    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);
   +    Table table = TestTables.create(temp, "test", SCHEMA, SPEC, 
formatVersion);
    
        // Write initial data
        DataFile fileOne = createDataFile("one");
   @@ -187,10 +179,7 @@ public class TestScansAndSchemaEvolution {
      @TestTemplate
      public void testAddColumnWithDefaultValueAndPartitionTransform() throws 
IOException {
        assumeThat(V3_AND_ABOVE).as("Default values require 
v3+").contains(formatVersion);
   -    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);
   +    Table table = TestTables.create(temp, "test", SCHEMA, SPEC, 
formatVersion);
    
        // Write initial data
        DataFile fileOne = createDataFile("one");
   ```



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

Reply via email to