srowen commented on a change in pull request #29584:
URL: https://github.com/apache/spark/pull/29584#discussion_r480187059



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
##########
@@ -118,7 +118,7 @@ class DataFrameReader private[sql](sparkSession: 
SparkSession) extends Logging {
    * @since 1.4.0
    */
   def option(key: String, value: String): DataFrameReader = {
-    this.extraOptions += (key -> value)
+    this.extraOptions = this.extraOptions.updated(key, value)

Review comment:
       Because we already implement `+`, can you just write `this.extraOptions 
= this.extraOptions.updated + (key -> value)`? I think that is how Scala 2.12 
desugared this already, but 2.13 won't. If so that's the most straightforward 
change, doesn't need a new method.




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