cloud-fan commented on a change in pull request #24094: [SPARK-27162][SQL] Add 
new method getOriginalMap in CaseInsensitiveStringMap
URL: https://github.com/apache/spark/pull/24094#discussion_r265842993
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/util/CaseInsensitiveStringMap.java
 ##########
 @@ -78,11 +81,13 @@ public String get(Object key) {
 
   @Override
   public String put(String key, String value) {
+    original.put(key, value);
 
 Review comment:
   The thing worries me most is the inconsistency between the case insensitive 
map and the original map. I think we should either fail or keep the latter 
entry if `a -> 1, A -> 2` appears together.
   
   One thing we can simplify is, `CaseInsensitiveStringMap` is read by data 
source and can be read-only. Then it can be easier to resolve conflicting 
entries at the beginning.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to