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-50953][FOLLOW-UP] Allow whitespace/tab in variantGet paths #50484

Conversation

harshmotw-db
Copy link
Contributor

What changes were proposed in this pull request?

This PR allows for whitespaces to be used in variantGet paths.

Why are the changes needed?

JSON keys can have whitespaces and there needs to be a way to extract them.

Does this PR introduce any user-facing change?

Yes, it allows for a more diverse set of variant_get paths.

How was this patch tested?

Unit tests.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Apr 1, 2025
Copy link
Contributor

@chenhao-db chenhao-db left a comment

Choose a reason for hiding this comment

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

Nice. I have noticed this issue before and this is also my imagined approach to fix it.

Copy link
Contributor

@gene-db gene-db left a comment

Choose a reason for hiding this comment

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

Wow, such a simple fix, thanks!

LGTM

@cloud-fan
Copy link
Contributor

thanks, merging to master/4.0!

@cloud-fan cloud-fan closed this in ba7a537 Apr 5, 2025
cloud-fan pushed a commit that referenced this pull request Apr 5, 2025
### What changes were proposed in this pull request?

This PR allows for whitespaces to be used in variantGet paths.

### Why are the changes needed?

JSON keys can have whitespaces and there needs to be a way to extract them.

### Does this PR introduce _any_ user-facing change?

Yes, it allows for a more diverse set of variant_get paths.

### How was this patch tested?

Unit tests.

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #50484 from harshmotw-db/harsh-motwani_data/variant_get_path.

Authored-by: Harsh Motwani <harsh.motwani@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit ba7a537)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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.

4 participants