Skip to content

Spark 3.x: Use original option keys in SparkCatalog#5044

Merged
rdblue merged 1 commit intoapache:masterfrom
rajarshisarkar:spark-3.x-use-original-option-keys-in-spark-catalog
Jun 29, 2022
Merged

Spark 3.x: Use original option keys in SparkCatalog#5044
rdblue merged 1 commit intoapache:masterfrom
rajarshisarkar:spark-3.x-use-original-option-keys-in-spark-catalog

Conversation

@rajarshisarkar
Copy link
Contributor

Backports #4903


cc: @rdblue

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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Map<String, String> optionsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
optionsMap.putAll(options.asCaseSensitiveMap());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I have made the change.

@rajarshisarkar rajarshisarkar force-pushed the spark-3.x-use-original-option-keys-in-spark-catalog branch from 56e8daf to 5782aea Compare June 28, 2022 08:54
@rdblue
Copy link
Contributor

rdblue commented Jun 28, 2022

@rajarshisarkar, can you fix 3.3 as well?

@rajarshisarkar rajarshisarkar force-pushed the spark-3.x-use-original-option-keys-in-spark-catalog branch from 5782aea to c537e8a Compare June 29, 2022 04:40
@rajarshisarkar
Copy link
Contributor Author

@rdblue, I have made changes for Spark 3.3

@rdblue rdblue merged commit 7f152b1 into apache:master Jun 29, 2022
@rdblue
Copy link
Contributor

rdblue commented Jun 29, 2022

Thanks, @rajarshisarkar!

@rdblue rdblue added this to the Iceberg 0.14.0 Release milestone Jun 29, 2022
namrathamyske pushed a commit to namrathamyske/iceberg that referenced this pull request Jul 10, 2022
namrathamyske pushed a commit to namrathamyske/iceberg that referenced this pull request Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants