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 2020/09/07 14:52:37 UTC

[GitHub] [spark] MaxGekk opened a new pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

MaxGekk opened a new pull request #29662:
URL: https://github.com/apache/spark/pull/29662


   ### What changes were proposed in this pull request?
   In the PR, I propose to fix an issue with the CSV and JSON data sources in Spark SQL when both of the following are true:
   * no user specified schema
   * some file paths contain escaped glob metacharacters, such as `[``]`, `{``}`, `*` etc.
   
   ### Why are the changes needed?
   To fix the issue when the follow two queries try to read from paths `[abc].csv` and `[abc].json`:
   ```scala
   spark.read.csv("""/tmp/\[abc\].csv""").show
   spark.read.json("""/tmp/\[abc\].json""").show
   ```
   but would end up hitting an exception:
   ```
   org.apache.spark.sql.AnalysisException: Path does not exist: file:/tmp/[abc].csv;
     at org.apache.spark.sql.execution.datasources.DataSource$.$anonfun$checkAndGlobPathIfNecessary$1(DataSource.scala:722)
     at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:244)
     at scala.collection.immutable.List.foreach(List.scala:392)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   ### How was this patch tested?
   Added new test cases in `DataFrameReaderWriterSuite`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688485004






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688484409


   **[Test build #128358 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128358/testReport)** for PR 29662 at commit [`c197cd9`](https://github.com/apache/spark/commit/c197cd90b7fbc5d8ddb871ff9702c675dfd5de42).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688376838






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688376838






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688485004






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688376252


   **[Test build #128358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128358/testReport)** for PR 29662 at commit [`c197cd9`](https://github.com/apache/spark/commit/c197cd90b7fbc5d8ddb871ff9702c675dfd5de42).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688557471


   Merged to branch-3.0.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon closed pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29662:
URL: https://github.com/apache/spark/pull/29662


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29662: [SPARK-32810][SQL][3.0] CSV/JSON data sources should avoid globbing paths when inferring schema

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29662:
URL: https://github.com/apache/spark/pull/29662#issuecomment-688376252


   **[Test build #128358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128358/testReport)** for PR 29662 at commit [`c197cd9`](https://github.com/apache/spark/commit/c197cd90b7fbc5d8ddb871ff9702c675dfd5de42).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org