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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]