You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/12 00:14:35 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #24062: [SPARK-26594][SQL] DataSourceOptions.asMap should return CaseInsensitiveMap

HyukjinKwon commented on a change in pull request #24062: [SPARK-26594][SQL] DataSourceOptions.asMap should return CaseInsensitiveMap
URL: https://github.com/apache/spark/pull/24062#discussion_r264479108
 
 

 ##########
 File path: sql/core/src/main/java/org/apache/spark/sql/sources/v2/DataSourceOptions.java
 ##########
 @@ -92,8 +94,8 @@ public DataSourceOptions(Map<String, String> originalMap) {
     }
   }
 
-  public Map<String, String> asMap() {
-    return new HashMap<>(keyLowerCasedMap);
+  public CaseInsensitiveMap<String> asMap() {
 
 Review comment:
   I think there was a discussion that returning `CaseInsensitiveMap` was a bad design before (IIRC). I think that's the reason why it return a regular map instead. Why don't we just clearly document what it returns? I think this can be a conservative compromise as well.

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


With regards,
Apache Git Services

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