Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,9 @@ public void close() throws IOException {
}
};
}

@Override
public String toString() {
return path.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ public void outputFileOverwritesFile() throws IOException {
}
}

@Test
public void inputFileToStringReturnsPath() throws IOException {
Path path = Paths.get(createTempFile().getPath());
InputFile read = new LocalInputFile(path);
// toString() is used by ParquetFileReader when constructing error messages
// such as "<path> is not a Parquet file (length is too low: ...)". A
// path-bearing toString() keeps those error messages actionable for
// implementations that don't expose a more specific accessor.
assertEquals(path.toString(), read.toString());
}

@Test
public void outputFileCreateFailsAsFileAlreadyExists() throws IOException {
Path path = Paths.get(createTempFile().getPath());
Expand Down