You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/28 02:17:31 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5044: Spark 3.x: Use original option keys in SparkCatalog

rdblue commented on code in PR #5044:
URL: https://github.com/apache/iceberg/pull/5044#discussion_r907965437


##########
spark/v3.1/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -118,8 +118,7 @@ public class SparkCatalog extends BaseCatalog {
    */
   protected Catalog buildIcebergCatalog(String name, CaseInsensitiveStringMap options) {
     Configuration conf = SparkUtil.hadoopConfCatalogOverrides(SparkSession.active(), name);
-    Map<String, String> optionsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
-    optionsMap.putAll(options);
+    Map<String, String> optionsMap = new TreeMap<>(options.asCaseSensitiveMap());

Review Comment:
   @rajarshisarkar, don't we still need to create the map with `CASE_INSENSITIVE_ORDER`? We want to use the original keys, but it should not force case sensitivity. So this should be:
   
   ```java
   Map<String, String> optionsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
   optionsMap.putAll(options.asCaseSensitiveMap());
   ```



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

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org