-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26339][SQL]Throws better exception when reading files that start with underscore #23288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
2910cb9
08850ae
777b4db
c0a57d9
1b64ffb
a95637e
239cfa4
e72bf00
abfe2e6
3708ef1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
… is ignored
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -554,9 +554,13 @@ 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) || InMemoryFileIndex.shouldFilterOut(globPath.head.getName))) { | ||
| throw new AnalysisException(s"Path does not exist: ${globPath.head}") | ||
| if (checkFilesExist) { | ||
| val firstPath = globPath.head | ||
| if (!fs.exists(firstPath)) { | ||
| throw new AnalysisException(s"Path does not exist: ${firstPath}") | ||
| } else if (InMemoryFileIndex.shouldFilterOut(firstPath.getName)) { | ||
| throw new AnalysisException(s"Path exists but is ignored: ${firstPath}") | ||
|
||
| } | ||
| } | ||
| globPath | ||
| }.toSeq | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, does it make sense to check only the first file? Looks multiple files could be detected.