Skip to content

feat: add support for url_encode, url_decode, and try_url_decode#4231

Open
parthchandra wants to merge 2 commits intoapache:mainfrom
parthchandra:try_url_decode
Open

feat: add support for url_encode, url_decode, and try_url_decode#4231
parthchandra wants to merge 2 commits intoapache:mainfrom
parthchandra:try_url_decode

Conversation

@parthchandra
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #4155

Rationale for this change

try_url_decode was returning incorrect results

What changes are included in this PR?

How are these changes tested?

SQL file tests -
expressions/url/url_decode.sql — valid inputs, malformed input errors
expressions/url/url_encode.sql — valid inputs, multibyte UTF-8
expressions/url/try_url_decode.sql — same inputs as url_decode, malformed input returns NULL

@parthchandra parthchandra marked this pull request as draft May 5, 2026 20:26
@parthchandra parthchandra marked this pull request as ready for review May 5, 2026 21:48
@parthchandra parthchandra requested review from andygrove and comphead and removed request for comphead May 5, 2026 21:48
@andygrove
Copy link
Copy Markdown
Member

Thanks @parthchandra, could you add the tests that I was adding in #4152 ? They covered some edge cases

@parthchandra
Copy link
Copy Markdown
Contributor Author

Thanks @parthchandra, could you add the tests that I was adding in #4152 ? They covered some edge cases

Sure. Do we want to add parse_url to this PR as well?

@andygrove
Copy link
Copy Markdown
Member

I don't mind either way. We can do that as separate PR if easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

url_decode: try_url_decode (Spark 4.0) errors instead of returning NULL on malformed input

2 participants