chinmay-bhat commented on code in PR #9382:
URL: https://github.com/apache/iceberg/pull/9382#discussion_r1451568424
##########
mr/src/test/java/org/apache/iceberg/mr/TestInputFormatReaderDeletes.java:
##########
@@ -62,24 +67,20 @@ public static Object[][] parameters() {
};
}
- @Before
+ @BeforeEach
@Override
public void writeTestDataFile() throws IOException {
conf.set(CatalogUtil.ICEBERG_CATALOG_TYPE, Catalogs.LOCATION);
super.writeTestDataFile();
}
- public TestInputFormatReaderDeletes(String inputFormat, FileFormat
fileFormat) {
- this.inputFormat = inputFormat;
- this.fileFormat = fileFormat;
- }
-
@Override
protected Table createTable(String name, Schema schema, PartitionSpec spec)
throws IOException {
Table table;
- File location = temp.newFolder(inputFormat, fileFormat.name());
- Assert.assertTrue(location.delete());
+ File location =
temp.resolve(inputFormat).resolve(fileFormat.name()).toFile();
+ location.mkdirs();
Review Comment:
In other places, when we have a single temp file, we don't need it.
But wherever we have nested directories, we do use it.
For example, in `TestPartitionValues`:
```
String desc = "null_part";
File parent = new File(temp.toFile(), desc);
File location = new File(parent, "test");
File dataFolder = new File(location, "data");
assertThat(dataFolder.mkdirs()).as("mkdirs should succeed").isTrue();
```
--
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]