Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark 3.5: Support camel case session configs and options #10310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aokolnychyi
Copy link
Contributor

@aokolnychyi aokolnychyi commented May 10, 2024

This PR adds support for parsing camel case session configs and options. Our keys contain - but all built-in Spark configs follow the camel case style. Apart from the inconsistency, setting Iceberg SQL configs requires escaping the keys, which makes it confusing for the users.

The following statement throws an error and requires the user to manually deal with -.

SET spark.sql.iceberg.planning.preserve-data-grouping = false

After this change, users will be able to set SQL properties and options either using - or camel case.

SET spark.sql.iceberg.planning.preserveDataGrouping = false
SET `spark.sql.iceberg.planning.preserve-data-grouping` = false

We already have a precedent for this in SparkWriteOptions.

public static final String MERGE_SCHEMA = "merge-schema";
public static final String SPARK_MERGE_SCHEMA = "mergeSchema";

@github-actions github-actions bot added the spark label May 10, 2024
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.

None yet

3 participants