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-51307][SQL] locationUri in CatalogStorageFormat shall be decoded for display #50074

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yaooqinn
Copy link
Member

What changes were proposed in this pull request?

This PR uses CatalogUtils.URIToString instead of URI.toString to decode the location URI.

Why are the changes needed?

For example, for partition specs like test1=X'16', test3=timestamp'2018-11-17 13:33:33', the stored path will include them as test1=%16/test3=2018-11-17 13%3A33%3A33 because the special characters are escaped. Furthermore, while resolving the whole path string to a URI object, this path fragment becomes test1=%2516/test3=2018-11-17 13%253A33%253A33, so we need to decode %25 -> % before displaying to users

Does this PR introduce any user-facing change?

yes, DESC TABLE will not show 2x-encoded paths.

How was this patch tested?

new tests

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

no

@github-actions github-actions bot added the SQL label Feb 25, 2025
@yaooqinn
Copy link
Member Author

cc @cloud-fan @dongjoon-hyun @HyukjinKwon, thank you

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.

1 participant