HyukjinKwon commented on a change in pull request #29160:
URL: https://github.com/apache/spark/pull/29160#discussion_r457292901



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

Review comment:
       I don't mind doing separately if this is going to be more controversial 
but I think we should just address it together with `option` for example by 
using`collection.mutable.LinkedHashMap` and `collection.immutable.ListMap`. 
Looks like `jdbc` has the same issue too.
   
   I think it's very unlikely that users depend on the indeterministic 
behaviours of `option("paTh").option("Path")` and it sounds more like a bug fix 
to me - the same option `path` is set later via `option` but not respected. 
Took a cursory look and seems feasible without a big 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:
[email protected]



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

Reply via email to