Skip to content
Merged
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
1 change: 1 addition & 0 deletions gortools/src/test/java/gorsat/UTestGorif.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public static Collection<Object[]> data() throws IOException {
{"Invalid file path missing -dh", "gorif not_exists.gor", null, GorParsingException.class},
{"Empty file missing -dh", "gorif " + testEmptyFile, null, GorParsingException.class},
{"Invalid file path with -dh", "gorif -dh col1,col2 not_exists.gor", "col1\tcol2\n", null},
{"Invalid nested file path with -dh", "gorif -dh col1,col2 some/not_exists.gor", "col1\tcol2\n", null},
{"Invalid file path with invalid -dh value", "gorif -dh col1 not_exists.gor", null, GorParsingException.class},
{"Both invalid and valid file path", "gorif " + testFileGor1 + " not_exists.gor",
"""
Expand Down
1 change: 1 addition & 0 deletions gortools/src/test/java/gorsat/UTestNorif.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static Collection<Object[]> data() throws IOException {
{"Nested query started with norif", "norif <(nor " + testTsvFile1 + ")",
expectedHeader + "chrN\t0\tA\t1\tA\n", null},
{"Invalid file path", "norif -dh col1,col2 not_exists.tsv", HEADER_PREFIX+ "col1\tcol2\n", null},
{"Invalid nested file path", "norif -dh col1,col2 some/not_exists.tsv", HEADER_PREFIX+ "col1\tcol2\n", null},
{"Invalid file path, single col", "norif -dh col1 not_exists.tsv", HEADER_PREFIX+ "col1\n", null},
{"Invalid file path missing -dh", "norif not_exists.tsv", null, GorParsingException.class},
{"Empty file missing -dh", "norif " + testEmptyFile, null, GorParsingException.class},
Expand Down
4 changes: 2 additions & 2 deletions model/src/main/java/org/gorpipe/gor/model/FileReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package org.gorpipe.gor.model;

import com.google.common.base.Strings;
import org.gorpipe.exceptions.GorException;
import org.gorpipe.exceptions.GorSystemException;
import org.gorpipe.gor.driver.DataSource;
import org.gorpipe.gor.driver.meta.SourceReference;
Expand Down Expand Up @@ -364,7 +365,6 @@ public Stream<SourceRef> prepareSources(Stream<SourceRef> sources) {
* NOTE: This can be expensive, so it should be used with care. This is only needed for
* (shared)filesystems (not object storage).
* @param path
* @throws IOException
*/
public void updateFileSystemMetaData(String path) throws IOException {
if (PathUtils.isLocal(path)) {
Expand All @@ -389,7 +389,7 @@ public boolean existsWithMetaDataUpdate(String path) {
try {
// If the file does not exist, we try to update the metadata.
updateFileSystemMetaData(path);
} catch (IOException e) {
} catch (IOException | GorException e) {
log.warn("Could not update file system metadata for path: {}", path, e);
return false;
}
Expand Down
Loading