Github user rdblue commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20535#discussion_r166709990
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala ---
    @@ -171,7 +171,8 @@ class DataFrameReader private[sql](sparkSession: 
SparkSession) extends Logging {
        * @since 1.4.0
        */
       def load(path: String): DataFrame = {
    -    option("path", path).load(Seq.empty: _*) // force invocation of 
`load(...varargs...)`
    +    // force invocation of `load(...varargs...)`
    +    option(DataSourceOptions.KEY_PATH, path).load(Seq.empty: _*)
    --- End diff --
    
    It seems odd to me to change this string. While there's no behavior change, 
the constant is for a key in v2's DataSourceOptions, not for the 
DataFrameReader API. We could change it to "PATH" and it would be perfectly 
fine for v2, but would change the behavior here. Such a change is incredibly 
unlikely, which is why I say it is just "odd".


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to