-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-51307][SQL][3.5] locationUri in CatalogStorageFormat shall be decoded for display #50164
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
Conversation
…decoded for display
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making a backporting PR.
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending CIs
|
Sorry but could you rebase once more because Docker and SparkR CI also failed before, @yaooqinn ?
|
|
Thank you @dongjoon-hyun |
…decoded for display ### 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 Closes #50164 from yaooqinn/SPARK-51307-35. Authored-by: Kent Yao <[email protected]> Signed-off-by: Kent Yao <[email protected]>
|
Merged to branch 3.5, thank you again @dongjoon-hyun |
…decoded for display ### 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 Closes apache#50164 from yaooqinn/SPARK-51307-35. Authored-by: Kent Yao <[email protected]> Signed-off-by: Kent Yao <[email protected]>
…ed for display (apache#728) [SPARK-51307][SQL][3.5] locationUri in CatalogStorageFormat shall be decoded for display ### 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 Closes apache#50164 from yaooqinn/SPARK-51307-35. Authored-by: Kent Yao <[email protected]> Signed-off-by: Kent Yao <[email protected]> Co-authored-by: Kent Yao <[email protected]>

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%3A33because the special characters are escaped. Furthermore, while resolving the whole path string to a URI object, this path fragment becomestest1=%2516/test3=2018-11-17 13%253A33%253A33, so we need to decode%25->%before displaying to usersDoes 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