Skip to content
Next Next commit
Throws better exception when reading files that start with underscore
  • Loading branch information
Hirobe Keiichi committed Dec 11, 2018
commit 2910cb9c3c14c97ba4b26d1fab09ab35284aaa3e
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ case class DataSource(

// Sufficient to check head of the globPath seq for non-glob scenario
// Don't need to check once again if files exist in streaming mode
if (checkFilesExist && !fs.exists(globPath.head)) {
if (checkFilesExist &&
(!fs.exists(globPath.head) || InMemoryFileIndex.shouldFilterOut(globPath.head.getName))) {
throw new AnalysisException(s"Path does not exist: ${globPath.head}")
}
globPath
Expand Down