Github user ilooner commented on a diff in the pull request:
https://github.com/apache/drill/pull/984#discussion_r148395420
--- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestCorruptParquetDateCorrection.java
---
@@ -377,21 +386,21 @@ public void testReadOldMetadataCacheFileOverrideCorrection() throws
Exception {
@Test
public void testReadNewMetadataCacheFileOverOldAndNewFiles() throws Exception {
- String table = format("dfs.`%s`", new Path(getDfsTestTmpSchemaLocation(), MIXED_CORRUPTED_AND_CORRECT_PARTITIONED_FOLDER));
- copyMetaDataCacheToTempReplacingInternalPaths(
+ File meta = dirTestWatcher.copyResourceToRoot(
"parquet/4203_corrupt_dates/mixed_version_partitioned_metadata.requires_replace.txt",
- MIXED_CORRUPTED_AND_CORRECT_PARTITIONED_FOLDER, Metadata.METADATA_FILENAME);
+ Paths.get(MIXED_CORRUPTED_AND_CORRECT_PARTITIONED_FOLDER, Metadata.METADATA_FILENAME).toString());
--- End diff --
I've cleaned this up a bit. Of the two patterns for building paths and files I prefer
pattern **A** because it is cleaner.
**Pattern A:**
```
myPath.resolve("subDir1")
.resolve("subDir2")
.toFile();
```
**Pattern B:**
```
new File(new File(myFile, "subDir1"), "subDir2")
```
---
|