Skip to content

Commit

Permalink
Avoid checkFilesExist check
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirobe Keiichi committed Dec 29, 2018
1 parent a95637e commit 239cfa4
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,20 +560,18 @@ case class DataSource(
globPath
}.toSeq

if (checkFilesExist) {
val (filtered, filteredOut) = allGlobPath.partition { path =>
!InMemoryFileIndex.shouldFilterOut(path.getName)
}
if (filteredOut.nonEmpty) {
if (filtered.isEmpty) {
throw new AnalysisException(
"All path were ignored. The following path were ignored:\n" +
s"${filteredOut.mkString("\n ")}")
} else {
logDebug(
"The following path were ignored:\n" +
s"${filteredOut.mkString("\n ")}")
}
val (filtered, filteredOut) = allGlobPath.partition { path =>
!InMemoryFileIndex.shouldFilterOut(path.getName)
}
if (filteredOut.nonEmpty) {
if (filtered.isEmpty) {
throw new AnalysisException(
"All path were ignored. The following path were ignored:\n" +
s"${filteredOut.mkString("\n ")}")
} else {
logDebug(
"The following path were ignored:\n" +
s"${filteredOut.mkString("\n ")}")
}
}

Expand Down

0 comments on commit 239cfa4

Please sign in to comment.