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/08/02 21:11:33 UTC

[GitHub] [spark] imback82 opened a new pull request #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

imback82 opened a new pull request #29328:
URL: https://github.com/apache/spark/pull/29328


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   This PR proposes to make the behavior consistent for the `path` option when loading dataframes with a single path (e.g, `option("path", path).format("parquet").load(path)` vs. `option("path", path).parquet(path)`).
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   The current behavior is inconsistent:
   ```
   scala> Seq(1).toDF.write.mode("overwrite").parquet("/tmp/test")
                                                                                   
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test").show
   +-----+
   |value|
   +-----+
   |    1|
   +-----+
   
   
   scala> spark.read.option("path", "/tmp/test").parquet("/tmp/test").show
   +-----+
   |value|
   +-----+
   |    1|
   |    1|
   +-----+
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, now the behavior is consistent:
   ```
   scala> Seq(1).toDF.write.mode("overwrite").parquet("/tmp/test")
   
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test").show
   +-----+                                                                         
   |value|
   +-----+
   |    1|
   +-----+
   
   
   scala> spark.read.option("path", "/tmp/test").parquet("/tmp/test").show
   +-----+
   |value|
   +-----+
   |    1|
   +-----+
   ```
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Added a test


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127243 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127243/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466122116



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,17 +224,6 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {

Review comment:
       This is no longer relevant, so I am removing it. But I am keeping the case insensitivity check in the new test.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127118/
   Test FAILed.


----------------------------------------------------------------
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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-679234332


   @imback82 please open a PR to do the same check for `DataFrameWriter`, `DataStreamReader/Writer`, thanks!


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468168199



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       Is the following required (or is this just for semantics)?
   
   >  else if (paths.length == 1) {
   >    Some("path" -> paths.head)
   >  }
   
   I see `paths` should handle one or more paths: https://github.com/apache/spark/blob/8659ec554fe1993fcaf2ec4d1c4745205bddec7d/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileDataSourceV2.scala#L51-L57
   
   




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468330253



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       Yes, without this, few tests that involve "inferring" fail.
   
   Basically, when you do `spark.read.csv("/tmp")`, "path" option is populated since there is only one path parameter in `load()`. Now, when `infer` is called, `inputPaths: Seq[FileStatus]` is a result of listing files and there is the "path" option that is being carried over, so `infer` will try to read more data than needed.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468910024



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,12 +245,19 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if (extraOptions.contains("path") && paths.nonEmpty) {

Review comment:
       I added the check for `paths` option.
   
   Should we handle the case where `path` and `paths` options are both defined?




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466622862



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       If we update L257, it will only handle the case when `DataSource.lookupDataSourceV2` returns `Some`?




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127120 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127120/testReport)** for PR 29328 at commit [`17c94a4`](https://github.com/apache/spark/commit/17c94a455833700b9134f716682bc35255322f48).


----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-671092885


   Retest this please.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127674 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127674/testReport)** for PR 29328 at commit [`62794e5`](https://github.com/apache/spark/commit/62794e599d5243618a988875f9460f6a23c9ed5b).
    * This patch **fails due to an unknown error code, -9**.
    * 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] SparkQA commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127671 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127671/testReport)** for PR 29328 at commit [`ac007c0`](https://github.com/apache/spark/commit/ac007c02ffe3a1b63db8b478a86617e63a552ac3).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468168580



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       > I mean, we can remove `def load(path: String): DataFrame` and only keep `def load(paths: String*): DataFrame`. (if it doesn't break binary compatibility)
   
   Removing `def load(path: String)` breaks the binary compatibility, so I will not remove it:
   ```
   Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.sql.DataFrameReader.load(Ljava/lang/String;)Lorg/apache/spark/sql/Dataset;
   ```




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127243 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127243/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).


----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468305334



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       It's required, because
   ```
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
     option("path", path).load(Seq.empty: _*)
   }
   ```
   
   If we remove this method and always call `def load(paths: String*)`, we should make sure the behavior doesn't change, and we still generate "path" option if only one path is given.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127350 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127350/testReport)** for PR 29328 at commit [`63c9383`](https://github.com/apache/spark/commit/63c93839b25a50855851199c5286becd4674d0cf).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126949 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126949/testReport)** for PR 29328 at commit [`296d4bb`](https://github.com/apache/spark/commit/296d4bbab647189fb32f3ffc0051086f244bcfca).
    * This patch **fails Spark unit 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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r475147708



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +230,11 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)
+    if (sparkSession.sessionState.conf.legacyPathOptionBehavior) {
+      option("path", path).load(Seq.empty: _*)

Review comment:
       This is needed to restore the legacy behavior. Note that the legacy behavior is different for the following:
   * `spark.read.option("path", path).parquet(path)` => path is read twice
   * `spark.read.format("parquet").option("path", path).load(path)` => path is read once (option is overwritten)




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127293/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127344 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127344/testReport)** for PR 29328 at commit [`650d45d`](https://github.com/apache/spark/commit/650d45d0594734ef2fc3b9c037440d5d5f5f34cb).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468320706



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       Hmm, `def parquet(path: String)` has been calling `def load(paths: String*)`, not `def load(path: String)`, and it seems to have worked fine so far (other than the inconsistency this PR addresses), no?
   
   Btw, we shouldn't remove `def load(path: String)` because it breaks the binary compatibility.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r473655110



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,15 +224,15 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {
+  test("SPARK-32364: later option should override earlier options") {
     spark.read
       .format("org.apache.spark.sql.test")
       .option("paTh", "1")
       .option("PATH", "2")
       .option("Path", "3")
       .option("patH", "4")
-      .load("5")

Review comment:
       can we add `.option("path", "5")` to keep the test unchanged?

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,15 +224,15 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {
+  test("SPARK-32364: later option should override earlier options") {
     spark.read
       .format("org.apache.spark.sql.test")
       .option("paTh", "1")
       .option("PATH", "2")
       .option("Path", "3")
       .option("patH", "4")
-      .load("5")

Review comment:
       can we add `.option("path", "5")` to keep the test result unchanged?




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126949 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126949/testReport)** for PR 29328 at commit [`296d4bb`](https://github.com/apache/spark/commit/296d4bbab647189fb32f3ffc0051086f244bcfca).


----------------------------------------------------------------
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] imback82 commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   Yes, will do. Thanks for the review!


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127120 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127120/testReport)** for PR 29328 at commit [`17c94a4`](https://github.com/apache/spark/commit/17c94a455833700b9134f716682bc35255322f48).
    * This patch **fails Spark unit 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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-672624029


   LGTM except one question: do we still need this fix? https://github.com/apache/spark/pull/29328/files#r468330253


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466634683



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       I pushed a new commit that doesn't change the existing code except for the check. Please let me know what you think. Thanks!




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466818655



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,15 +224,15 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {
+  test("SPARK-32364: option key should be case insensitive") {

Review comment:
       nit: `later option should override earlier options`




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127344 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127344/testReport)** for PR 29328 at commit [`650d45d`](https://github.com/apache/spark/commit/650d45d0594734ef2fc3b9c037440d5d5f5f34cb).


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r464203736



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,22 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    val updatedPaths = if (paths.length == 1) {

Review comment:
       +1 for your suggestion




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127790 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127790/testReport)** for PR 29328 at commit [`e1decd4`](https://github.com/apache/spark/commit/e1decd4c7921f58446a46081b339d308d36529cc).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127298 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127298/testReport)** for PR 29328 at commit [`d344eb9`](https://github.com/apache/spark/commit/d344eb946d921c0d180069daac4f15438c452af4).
    * 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] viirya commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r469713195



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       Can you add some comments here at least? I feel it will confuse code readers later on why removing it...

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,27 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if ((extraOptions.contains("path") || extraOptions.contains("paths")) && paths.nonEmpty) {
+      throw new AnalysisException("There is a 'path' or 'paths' option set and load() is called " +
+        "with path parameters. Either remove the option or put it into the load() parameters.")

Review comment:
       `Either remove the option or not put it into the load() parameters`?

##########
File path: docs/sql-migration-guide.md
##########
@@ -36,6 +36,8 @@ license: |
 
   - In Spark 3.1, NULL elements of structures, arrays and maps are converted to "null" in casting them to strings. In Spark 3.0 or earlier, NULL elements are converted to empty strings. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.castComplexTypesToString.enabled` to `true`.
 
+  - In Spark 3.1, when loading a dataframe, `path` option cannot coexist with `load()`'s path parameters. For example, `spark.read.format("csv").option("path", "/tmp").load("/tmp2")` or `spark.read.option("path", "/tmp").csv("/tmp2")` will throw `org.apache.spark.sql.AnalysisException`. In Spark version 3.0 and below, `path` option is overwritten if one path parameter is passed to `load()`, or `path` option is added to the overall paths if multiple path parameters are passed to `load()`.

Review comment:
       Should `paths` be mentioned too?




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466818465



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       This works, another probably cleaner way is
   ```
   def load(paths: String*) = {
     val pathOption = if (paths.length == 1) {
       "path" -> ...
     } else if (paths.length > 1) {
       "paths" ->
     } else None
   }
   ```




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127293 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127293/testReport)** for PR 29328 at commit [`3e02205`](https://github.com/apache/spark/commit/3e022051714757222e3a87bcfaf40257289c8562).


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468295791



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       I also thought about update the following
   https://github.com/apache/spark/blob/8659ec554fe1993fcaf2ec4d1c4745205bddec7d/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L575
   
   to
   
   ```
   val allPaths = caseInsensitiveOptions.get("path").map(Seq(_)).getOrElse(paths)
   ```
   , but it looked like a risky change (e.g., there is no good place for assert, etc.).




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r467684583



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       What I propose is
   ```
   def load(paths: String*): DataFrame = {
     if (extraOptions.contains("path") && paths.nonEmpty) fail ...
     ...
     if (DSV2) {
       val pathOption = if (paths.isEmpty) {
         None
       } else if (paths.length == 1) {
         Some("path" -> paths.head)
       } else {
         Some("paths" -> ...)
       }
     } else {
       // for DS V1, do not generate extra path option
     }
   }
   ```




----------------------------------------------------------------
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] imback82 commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   > LGTM except one question: do we still need this fix? https://github.com/apache/spark/pull/29328/files#r468330253
   
   Yes, without it, the following tests fail:
   ```
    org.apache.spark.sql.execution.datasources.csv.CSVLegacyTimeParserSuite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.csv.CSVv1Suite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.csv.CSVv2Suite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonLegacyTimeParserSuite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonLegacyTimeParserSuite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonV1Suite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonV1Suite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonV2Suite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonV2Suite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.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] AmplabJenkins removed a comment on pull request #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468324590



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       This is a good catch! BTW does it have to be fixed in this PR? The check is added in `DataFrameReader.load` and `DataSource.resolveRelation` should be fine.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127121 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127121/testReport)** for PR 29328 at commit [`4c6ada7`](https://github.com/apache/spark/commit/4c6ada7e5ddc82f1ffdcfb3c57e360eba1d2d9d2).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127674 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127674/testReport)** for PR 29328 at commit [`62794e5`](https://github.com/apache/spark/commit/62794e599d5243618a988875f9460f6a23c9ed5b).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r464203078



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,22 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    val updatedPaths = if (paths.length == 1) {

Review comment:
       If we are worried about silent result changing, we can fail if there are `path` option and `load` is called with path parameters. The error message should ask users to either remove the `path` options, we put it into the `load` parameters.

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,22 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    val updatedPaths = if (paths.length == 1) {

Review comment:
       If we are worried about silent result changing, we can fail if there are `path` option and `load` is called with path parameters. The error message should ask users to either remove the `path` options, or put it into the `load` parameters.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126945/
   Test FAILed.


----------------------------------------------------------------
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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-671159225


   Yes, we need a migration guide.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127789 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127789/testReport)** for PR 29328 at commit [`92bf5ef`](https://github.com/apache/spark/commit/92bf5efa57a011b8cc306812901348d88e7c1223).
    * 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 removed a comment on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127120/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127698 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127698/testReport)** for PR 29328 at commit [`d5c4203`](https://github.com/apache/spark/commit/d5c4203db477a1424e27f036845b33ffec695ada).
    * 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 removed a comment on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127344 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127344/testReport)** for PR 29328 at commit [`650d45d`](https://github.com/apache/spark/commit/650d45d0594734ef2fc3b9c037440d5d5f5f34cb).
    * 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] SparkQA commented on pull request #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126945 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126945/testReport)** for PR 29328 at commit [`63f3d60`](https://github.com/apache/spark/commit/63f3d60b0b00990cd5a2784b1be8961c058dc2c6).


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r473566413



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       Thanks @viirya for pointing it out. This is now addressed in #29437.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466623120



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,17 +224,6 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {

Review comment:
       OK. I put this back and renamed the test. Thanks.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127789 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127789/testReport)** for PR 29328 at commit [`92bf5ef`](https://github.com/apache/spark/commit/92bf5efa57a011b8cc306812901348d88e7c1223).


----------------------------------------------------------------
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] viirya commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r467199754



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,6 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
+    verifyPathOptionDoesNotExist()

Review comment:
       Do we consider to put a line in migration guide? This sounds a breaking change.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466125984



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -826,27 +826,6 @@ class FileBasedDataSourceSuite extends QueryTest
     }
   }
 
-  test("File table location should include both values of option `path` and `paths`") {

Review comment:
       @cloud-fan This is a test that's failing. Looks like this was a supported scenario and is it OK to deprecate this behavior?




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127698 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127698/testReport)** for PR 29328 at commit [`d5c4203`](https://github.com/apache/spark/commit/d5c4203db477a1424e27f036845b33ffec695ada).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127350 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127350/testReport)** for PR 29328 at commit [`63c9383`](https://github.com/apache/spark/commit/63c93839b25a50855851199c5286becd4674d0cf).
    * 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] SparkQA commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127790 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127790/testReport)** for PR 29328 at commit [`e1decd4`](https://github.com/apache/spark/commit/e1decd4c7921f58446a46081b339d308d36529cc).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127298 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127298/testReport)** for PR 29328 at commit [`d344eb9`](https://github.com/apache/spark/commit/d344eb946d921c0d180069daac4f15438c452af4).


----------------------------------------------------------------
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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-679233676


   thanks, merging to master!


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466165046



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       To keep the behavior, I think we should still generate the `path` option when only one path is given in the parameters. We need to update L257.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466829121



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       I mean, we can remove `def load(path: String): DataFrame` and only keep `def load(paths: String*): DataFrame`. (if it doesn't break binary compatibility)
   
   The check should be put in `def load(paths: String*)`, which should generate "path" option if `paths` only have one element.




----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468326123



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -395,7 +395,7 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
       .load("/test")
 
     assert(LastOptions.parameters("intOpt") == "56")
-    assert(LastOptions.parameters("path") == "/test")
+    assert(!LastOptions.parameters.contains("path"))

Review comment:
       Sorry I missed one thing. For DS v1, `...load(path)` will generate a `path` option, which is visible to v1 sources, and we can't break it. It's strange that `...load(path1, path2)` will completely ignore the paths and don't pass paths to v1 sources, but there is nothing we can do here.
   
   We need to update `DataFrameReader.loadV1Source` to generate a `path` option if `paths.length == 1` (and set paths to Nil), to keep the previous behavior.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 edited a comment on pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 edited a comment on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-667748032


   FYI, the existing test `"SPARK-11544 test pathfilter"` fails if I change
   ```
   assert(spark.read.options(extraOptions).json(path).count() === 2)
   ```
   to
   ```
   assert(spark.read.options(extraOptions).format("json").load(path).count() === 2)
   ```
   We expect the same behavior b/w these two APIs right?


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127293 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127293/testReport)** for PR 29328 at commit [`3e02205`](https://github.com/apache/spark/commit/3e022051714757222e3a87bcfaf40257289c8562).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] imback82 edited a comment on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 edited a comment on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-673180206


   > LGTM except one question: do we still need this fix? https://github.com/apache/spark/pull/29328/files#r468330253
   
   Yes, without it, the following tests fail:
   ```
    org.apache.spark.sql.execution.datasources.csv.CSVLegacyTimeParserSuite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.csv.CSVv1Suite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.csv.CSVv2Suite.SPARK-23846: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonLegacyTimeParserSuite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonLegacyTimeParserSuite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonV1Suite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonV1Suite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.0
    org.apache.spark.sql.execution.datasources.json.JsonV2Suite.SPARK-11544 test pathfilter
    org.apache.spark.sql.execution.datasources.json.JsonV2Suite.SPARK-23849: schema inferring touches less data if samplingRatio < 1.0
   ```
   
   Btw, this is an existing bug. For example, for `"SPARK-11544 test pathfilter"`, if I change `spark.read.options(extraOptions).json(path)` to `spark.read.options(extraOptions).option("path", path). format("json").load()`, it would fail. The changes in this PR are surfacing the existing issue.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127293 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127293/testReport)** for PR 29328 at commit [`3e02205`](https://github.com/apache/spark/commit/3e022051714757222e3a87bcfaf40257289c8562).
    * This patch **fails Spark unit 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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r473569196



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,27 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if ((extraOptions.contains("path") || extraOptions.contains("paths")) && paths.nonEmpty) {
+      throw new AnalysisException("There is a 'path' or 'paths' option set and load() is called " +
+        "with path parameters. Either remove the option or put it into the load() parameters.")

Review comment:
       I followed the suggestion from https://github.com/apache/spark/pull/29328#discussion_r464203078, but let me know if the current message is still vague. Thanks!




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127121 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127121/testReport)** for PR 29328 at commit [`4c6ada7`](https://github.com/apache/spark/commit/4c6ada7e5ddc82f1ffdcfb3c57e360eba1d2d9d2).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127790 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127790/testReport)** for PR 29328 at commit [`e1decd4`](https://github.com/apache/spark/commit/e1decd4c7921f58446a46081b339d308d36529cc).
    * 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 removed a comment on pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127121/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466164524



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -224,17 +224,6 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
     assert(LastOptions.parameters("opt3") == "3")
   }
 
-  test("SPARK-32364: path argument of load function should override all existing options") {

Review comment:
       We can just call `load` without parameters, this test is to verify that the later option overwrites the earlier ones.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127671 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127671/testReport)** for PR 29328 at commit [`ac007c0`](https://github.com/apache/spark/commit/ac007c02ffe3a1b63db8b478a86617e63a552ac3).
    * This patch **fails Spark unit 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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468326123



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -395,7 +395,7 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
       .load("/test")
 
     assert(LastOptions.parameters("intOpt") == "56")
-    assert(LastOptions.parameters("path") == "/test")
+    assert(!LastOptions.parameters.contains("path"))

Review comment:
       Sorry I missed one thing. For DS v1, `...load(path)` will generate a `path` option, which is visible to v1 sources, and we can't break it. It's strange that `...load(path1, path2)` will completely ignore the paths and don't pass paths to v1 sources, but there is nothing we can do here.
   
   We need to update `DataFrameReader.loadV1Source` to generate a `path` option if `paths.length == 1`, to keep the previous behavior.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468168199



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       Removing `def load(path: String)` breaks the binary compatibility:
   ```Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.sql.DataFrameReader.load(Ljava/lang/String;)Lorg/apache/spark/sql/Dataset;```
   So, I will not remove it.
   
   Also, is the following required?
   > else if (paths.length == 1) {
   >       Some("path" -> paths.head)
   >     }
   
   I see `paths` should handle one or more paths: https://github.com/apache/spark/blob/8659ec554fe1993fcaf2ec4d1c4745205bddec7d/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileDataSourceV2.scala#L51-L57
   
   




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468330472



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -395,7 +395,7 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with
       .load("/test")
 
     assert(LastOptions.parameters("intOpt") == "56")
-    assert(LastOptions.parameters("path") == "/test")
+    assert(!LastOptions.parameters.contains("path"))

Review comment:
       Yes, now it makes sense. I will update it, thanks!




----------------------------------------------------------------
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] imback82 commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   @cloud-fan, should we also make the behavior the same on the `save` path? Currently, the "path" option will be overwritten if a path is passed to `save`. Let me know if we need to enforce the same check (no coexistence), and I can do it either in this PR or as a follow-up PR. Thanks!


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127153 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127153/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).
    * 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 removed a comment on pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r473566629



##########
File path: docs/sql-migration-guide.md
##########
@@ -36,6 +36,8 @@ license: |
 
   - In Spark 3.1, NULL elements of structures, arrays and maps are converted to "null" in casting them to strings. In Spark 3.0 or earlier, NULL elements are converted to empty strings. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.castComplexTypesToString.enabled` to `true`.
 
+  - In Spark 3.1, when loading a dataframe, `path` option cannot coexist with `load()`'s path parameters. For example, `spark.read.format("csv").option("path", "/tmp").load("/tmp2")` or `spark.read.option("path", "/tmp").csv("/tmp2")` will throw `org.apache.spark.sql.AnalysisException`. In Spark version 3.0 and below, `path` option is overwritten if one path parameter is passed to `load()`, or `path` option is added to the overall paths if multiple path parameters are passed to `load()`.

Review comment:
       I added `paths` as well.

##########
File path: docs/sql-migration-guide.md
##########
@@ -36,6 +36,8 @@ license: |
 
   - In Spark 3.1, NULL elements of structures, arrays and maps are converted to "null" in casting them to strings. In Spark 3.0 or earlier, NULL elements are converted to empty strings. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.castComplexTypesToString.enabled` to `true`.
 
+  - In Spark 3.1, when loading a dataframe, `path` option cannot coexist with `load()`'s path parameters. For example, `spark.read.format("csv").option("path", "/tmp").load("/tmp2")` or `spark.read.option("path", "/tmp").csv("/tmp2")` will throw `org.apache.spark.sql.AnalysisException`. In Spark version 3.0 and below, `path` option is overwritten if one path parameter is passed to `load()`, or `path` option is added to the overall paths if multiple path parameters are passed to `load()`.

Review comment:
       I mentioned `paths` as well.




----------------------------------------------------------------
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] dongjoon-hyun edited a comment on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-671092764


   Yes. This is a breaking change, but I believe it's okay to fix it for behavioral clarity.
   We had better add some in the migration guide.
   
   cc @gatorsmile 


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127674/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127153 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127153/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).


----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466836253



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,6 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
+    verifyPathOptionDoesNotExist()

Review comment:
       Think about `df.write.option(path).load(paths)`. The current behavior is:
   1. if `paths` is just a single path, it overrides the path option.
   2. otherwise, it combines the path option.
   
   I would say the reasonable behavior is to always override the path option if `paths` is given. But this is a silent behavior change. And I think it's safer to fail if path option and `paths` are both specified.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127346 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127346/testReport)** for PR 29328 at commit [`808b7c0`](https://github.com/apache/spark/commit/808b7c0315849586d0b3e68e55914da525e2baba).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127298 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127298/testReport)** for PR 29328 at commit [`d344eb9`](https://github.com/apache/spark/commit/d344eb946d921c0d180069daac4f15438c452af4).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127350 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127350/testReport)** for PR 29328 at commit [`63c9383`](https://github.com/apache/spark/commit/63c93839b25a50855851199c5286becd4674d0cf).


----------------------------------------------------------------
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] cloud-fan closed pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #29328:
URL: https://github.com/apache/spark/pull/29328


   


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468324072



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,12 +245,19 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if (extraOptions.contains("path") && paths.nonEmpty) {

Review comment:
       Then we can make sure `path` and `paths` options wouldn't co-exist for DS v2, and you can make the change in https://github.com/apache/spark/pull/29328/files#r468295791




----------------------------------------------------------------
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] imback82 commented on pull request #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   I also see that `path` is treated different depending on the number of paths. For example,
   ```
   // For single path, "path" option is overridden with path given in "load"
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test").show
   +-----+                                                                         
   |value|
   +-----+
   |    1|
   +-----+
   
   // For multiple paths, "path" option is "added" to the paths given in "load"
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test", "/tmp/test").show
   +-----+
   |value|
   +-----+
   |    1|
   |    1|
   |    1|
   +-----+
   ```
   
   Should I just fix this inconsistency instead of this PR? If so, what should be the expected behavior (just ignore `path` option if paths are passed to `load`)?
   
   cc: @cloud-fan @dongjoon-hyun @viirya (Thanks in advance!)


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468191488



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       Instead of removing, I changed it to be just a passthrough so that we have a single place to check.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468192369



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,6 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
+    verifyPathOptionDoesNotExist()

Review comment:
       Updated the migration guide.

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,6 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
+    verifyPathOptionDoesNotExist()

Review comment:
       Updated the migration guide. Thanks!




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127698 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127698/testReport)** for PR 29328 at commit [`d5c4203`](https://github.com/apache/spark/commit/d5c4203db477a1424e27f036845b33ffec695ada).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127118 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127118/testReport)** for PR 29328 at commit [`9b6be0c`](https://github.com/apache/spark/commit/9b6be0ce52816e4d9db25190d71b3fdbe32d9f04).


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468323154



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       Ah OK. Thanks.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466824972



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       Sorry, I didn't get the suggestion. Are you suggesting not to check if the option already exists?  Then we still have to go [this](https://github.com/apache/spark/pull/29328/commits/63f3d60b0b00990cd5a2784b1be8961c058dc2c6#diff-f70bda59304588cc3abfa3a9840653f4R248) route where `paths` parameter is also updated, right? (The root cause of the inconsistency is that if you call `parquet(path)`, it would go to `load(paths: String*)` instead of `load(path: String)`.




----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466829121



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       I mean, we can remove `def load(path: String): DataFrame` and only keep `def load(paths: String*): DataFrame`.
   
   The check should be put in `def load(paths: String*)`, which should generate "path" option if `paths` only have one element.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r473654014



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,27 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if ((extraOptions.contains("path") || extraOptions.contains("paths")) && paths.nonEmpty) {
+      throw new AnalysisException("There is a 'path' or 'paths' option set and load() is called " +
+        "with path parameters. Either remove the option or put it into the load() parameters.")

Review comment:
       to make it clearer:
   ```
   Either remove the path option if it's the same as the path parameter, or add it
   to the load() parameter if you do want to read multiple paths.
   ```




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468286947



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       This is called during `infer` and "path" option gets added to `inputPaths` (if the option was originally defined), thus this needs to be removed.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126945 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126945/testReport)** for PR 29328 at commit [`63f3d60`](https://github.com/apache/spark/commit/63f3d60b0b00990cd5a2784b1be8961c058dc2c6).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127243 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127243/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).
    * 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] imback82 commented on pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   The existing test `"SPARK-11544 test pathfilter"` fails if I change
   ```
   assert(spark.read.options(extraOptions).json(path).count() === 2)
   ```
   to
   ```
   assert(spark.read.options(extraOptions).format("json").load(path).count() === 2)
   ```
   We expect the same behavior b/w these two APIs right?


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/127671/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466835388



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       > The check should be put in `def load(paths: String*)`, which should generate "path" option if `paths` only have one element.
   
   Generating a "path" option (assuming you meant `option("path", paths.head)`) is fine, but we need to set `paths` to `Seq.empty` since `loadV1Source` internally depends on the "path" option (e.g. `DataSource.checkAndGlobPathIfNecessary`). Then this becomes similar to [this](https://github.com/apache/spark/pull/29328/commits/63f3d60b0b00990cd5a2784b1be8961c058dc2c6#diff-f70bda59304588cc3abfa3a9840653f4R248)?




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126945 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126945/testReport)** for PR 29328 at commit [`63f3d60`](https://github.com/apache/spark/commit/63f3d60b0b00990cd5a2784b1be8961c058dc2c6).
    * This patch **fails Spark unit 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] SparkQA removed a comment on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127153 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127153/testReport)** for PR 29328 at commit [`cd15fe2`](https://github.com/apache/spark/commit/cd15fe257bd7edab22f1597a8ac0dce45cf183c9).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127346 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127346/testReport)** for PR 29328 at commit [`808b7c0`](https://github.com/apache/spark/commit/808b7c0315849586d0b3e68e55914da525e2baba).


----------------------------------------------------------------
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] viirya commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   Btw, could this be a breaking change? If existing query already use `spark.read.option("path", "...").format("parquet").load("...")`, this will break the query, right?


----------------------------------------------------------------
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] viirya commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466830497



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,6 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
+    verifyPathOptionDoesNotExist()

Review comment:
       For API usage view, I don't very agree with this rule. A later `load(path)` can be seen as to overwrite previous `path` option.
   
   But not against this, though.




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468295791



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       I also thought about update the following
   https://github.com/apache/spark/blob/8659ec554fe1993fcaf2ec4d1c4745205bddec7d/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L575
   
   to
   
   ```
   val allPaths = caseInsensitiveOptions.get("path").map(Seq(_)).getOrElse(paths)
   ```
   , but it seemed a risky change (e.g., there is no good place for assert, etc.).




----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468168580



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       > I mean, we can remove `def load(path: String): DataFrame` and only keep `def load(paths: String*): DataFrame`. (if it doesn't break binary compatibility)
   
   Removing `def load(path: String)` breaks the binary compatibility:
   Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.sql.DataFrameReader.load(Ljava/lang/String;)Lorg/apache/spark/sql/Dataset;
   So, I will not remove it.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r464202756



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,15 +245,22 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    val updatedPaths = if (paths.length == 1) {

Review comment:
       I think the most intuitive behavior is to drop the `path` option if `load` is called with path parameters, no matter it's one or more paths.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127789 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127789/testReport)** for PR 29328 at commit [`92bf5ef`](https://github.com/apache/spark/commit/92bf5efa57a011b8cc306812901348d88e7c1223).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466634683



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -229,7 +229,7 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
    */
   def load(path: String): DataFrame = {
     // force invocation of `load(...varargs...)`
-    option("path", path).load(Seq.empty: _*)

Review comment:
       I pushed a new commit that doesn't change existing code except for the check. Please let me know what you think. Thanks!




----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-671092764


   Yes. This is a breaking change, but I believe it's okay to fix it for behavior clarity.
   We had better add some in the migration guide.
   
   cc @gatorsmile 


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468323610



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,12 +245,19 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 
+    if (extraOptions.contains("path") && paths.nonEmpty) {

Review comment:
       how about we forbid `paths` option as well for consistency?




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #126949 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126949/testReport)** for PR 29328 at commit [`296d4bb`](https://github.com/apache/spark/commit/296d4bbab647189fb32f3ffc0051086f244bcfca).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126949/
   Test FAILed.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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] imback82 commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
imback82 commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468286947



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
##########
@@ -155,7 +155,7 @@ object TextInputCSVDataSource extends CSVDataSource {
         sparkSession,
         paths = paths,
         className = classOf[TextFileFormat].getName,
-        options = options.parameters
+        options = options.parameters - "path"

Review comment:
       This is called during `infer` and "path" option gets added to `inputPaths`, thus this needs to be removed.




----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468323149



##########
File path: docs/sql-migration-guide.md
##########
@@ -36,6 +36,8 @@ license: |
 
   - In Spark 3.1, NULL elements of structures, arrays and maps are converted to "null" in casting them to strings. In Spark 3.0 or earlier, NULL elements are converted to empty strings. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.castComplexTypesToString.enabled` to `true`.
 
+  - In Spark 3.1, when loading a dataframe, `path` option cannot coexist with `load()`'s path parameters. For example, `spark.read.format("csv").option("path", "/tmp").load("/tmp2")` or `spark.read.option("path", "/tmp").csv("/tmp2")` will throw `org.apache.spark.sql.AnalysisException`.

Review comment:
       Let's also mention the legacy behavior in 3.0 and below.




----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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


   **[Test build #127346 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127346/testReport)** for PR 29328 at commit [`808b7c0`](https://github.com/apache/spark/commit/808b7c0315849586d0b3e68e55914da525e2baba).
    * 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] cloud-fan commented on a change in pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r468322696



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -245,6 +246,10 @@ class DataFrameReader private[sql](sparkSession: SparkSession) extends Logging {
         "read files of Hive data source directly.")
     }
 

Review comment:
       parquet is a builtin source, so we can make it work anyway. `def load(path: String)` is general for other external sources, and we should guarantee backward compatibility here.




----------------------------------------------------------------
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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-673233345


   > Btw, this is an existing bug.
   
   Can we have a separate PR for this bug? Then we can backport the bug fix.
   
   > should we also make the behavior the same on the save path?
   
   This is a good point. We never document the overwrite behavior anywhere and people may not realize the path option is overwritten by the `save` path parameter. Let's do it in a new PR.


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127120 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127120/testReport)** for PR 29328 at commit [`17c94a4`](https://github.com/apache/spark/commit/17c94a455833700b9134f716682bc35255322f48).


----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127121 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127121/testReport)** for PR 29328 at commit [`4c6ada7`](https://github.com/apache/spark/commit/4c6ada7e5ddc82f1ffdcfb3c57e360eba1d2d9d2).
    * This patch **fails due to an unknown error code, -9**.
    * 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] cloud-fan commented on a change in pull request #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29328:
URL: https://github.com/apache/spark/pull/29328#discussion_r466165358



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -826,27 +826,6 @@ class FileBasedDataSourceSuite extends QueryTest
     }
   }
 
-  test("File table location should include both values of option `path` and `paths`") {

Review comment:
       It's for file source v2 only, I think it's OK to drop it.




----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127118 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127118/testReport)** for PR 29328 at commit [`9b6be0c`](https://github.com/apache/spark/commit/9b6be0ce52816e4d9db25190d71b3fdbe32d9f04).
    * This patch **fails Spark unit 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] cloud-fan commented on pull request #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-678063810


   Sorry, I forgot about one thing: we need a legacy config to restore to the previous behavior, in case users don't want to change their queries when upgrading Spark.
   
   @imback82 can you add it?


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [WIP][SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

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


   **[Test build #127118 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127118/testReport)** for PR 29328 at commit [`9b6be0c`](https://github.com/apache/spark/commit/9b6be0ce52816e4d9db25190d71b3fdbe32d9f04).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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] imback82 edited a comment on pull request #29328: [SPARK-32516][SQL] 'path' option should be treated consistently when loading dataframes for different APIs

Posted by GitBox <gi...@apache.org>.
imback82 edited a comment on pull request #29328:
URL: https://github.com/apache/spark/pull/29328#issuecomment-667725762


   I also see that `path` is treated different depending on the number of paths. For example,
   ```
   // For single path, "path" option is overridden with path given in "load"
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test").show
   +-----+                                                                         
   |value|
   +-----+
   |    1|
   +-----+
   
   // For multiple paths, "path" option is "added" to the paths given in "load"
   scala> spark.read.option("path", "/tmp/test").format("parquet").load("/tmp/test", "/tmp/test").show
   +-----+
   |value|
   +-----+
   |    1|
   |    1|
   |    1|
   +-----+
   ```
   
   Should I just fix this inconsistency instead of this PR? If so, what should be the expected behavior (just ignore `path` option if paths are passed to `load` or always add `path` to the given paths)?
   
   cc: @cloud-fan @dongjoon-hyun @viirya (Thanks in advance!)


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127674 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127674/testReport)** for PR 29328 at commit [`62794e5`](https://github.com/apache/spark/commit/62794e599d5243618a988875f9460f6a23c9ed5b).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot co-exist with load()'s path parameters

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






----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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


   **[Test build #127671 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127671/testReport)** for PR 29328 at commit [`ac007c0`](https://github.com/apache/spark/commit/ac007c02ffe3a1b63db8b478a86617e63a552ac3).


----------------------------------------------------------------
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 #29328: [SPARK-32516][SQL] 'path' option cannot coexist with load()'s path parameters

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






----------------------------------------------------------------
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