dongjoon-hyun edited a comment on pull request #29172:
URL: https://github.com/apache/spark/pull/29172#issuecomment-661616433


   For @HyukjinKwon  comments,
   - `CaseInsensitiveMap` is already using modified `originalMap` at `-` 
operation. Technically, `originalMap` is immutable, but  `+` operation can 
modify it too in the same reason. In short, both `-` and `+` operation should 
return the desirable map object for case-insensitivity. Also, this PR makes the 
class more consistent.
   - In general, `DataFrameReader` 
[example](https://github.com/apache/spark/pull/29172#issuecomment-661604611) is 
orthogonal to this PR because this PR is focusing on `CaseInsensitiveMap` only.
   - For the example, I believe it's not a good practice. For that alternative 
approach, we need to add an implicit assumption into the Apache Spark 
code-base. And, it'll be fragile when we add a new code.
       - We should warn that `.toMap` should not be used always.
       - All concatenation should start with 
`collection.immutable.ListMap.empty[String, String]` always.
   


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