You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/01/07 04:29:10 UTC
[GitHub] gatorsmile commented on a change in pull request #23446:
[SPARK-26339][SQL]Throws better exception when reading files that start
with underscore
gatorsmile commented on a change in pull request #23446: [SPARK-26339][SQL]Throws better exception when reading files that start with underscore
URL: https://github.com/apache/spark/pull/23446#discussion_r245547234
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
##########
@@ -559,6 +559,23 @@ case class DataSource(
}
globPath
}.toSeq
+
+ if (checkFilesExist) {
+ val (filteredOut, filteredIn) = allGlobPath.partition { path =>
+ InMemoryFileIndex.shouldFilterOut(path.getName)
+ }
+ if (filteredOut.nonEmpty) {
+ if (filteredIn.isEmpty) {
+ throw new AnalysisException(
Review comment:
I am afraid this could break the existing applications. Currently, when users specify the schema, no exception is thrown, right?
cc @HyukjinKwon @srowen @MaxGekk @cloud-fan
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org