Skip to content

[test](regression) Add malformed percent-encoding test cases for url_decode#64645

Open
yifanwu-sys wants to merge 1 commit into
apache:masterfrom
yifanwu-sys:add-regression-test-url-decode-clean
Open

[test](regression) Add malformed percent-encoding test cases for url_decode#64645
yifanwu-sys wants to merge 1 commit into
apache:masterfrom
yifanwu-sys:add-regression-test-url-decode-clean

Conversation

@yifanwu-sys

Copy link
Copy Markdown

What problem does this PR solve?

The url_decode regression test mainly covers valid URL decoding cases, but malformed percent-encoding inputs are not explicitly covered.

Malformed inputs such as truncated percent sequences or invalid hex characters should return an error. Without regression coverage, this behavior may be changed accidentally in future updates.

What is changed?

This PR adds regression test cases for malformed percent-encoding inputs in test_url_decode.groovy, including:

  • truncated percent sequence: '%2'
  • bare percent sign: '%'
  • trailing percent sign: 'hello%'
  • invalid hex characters: '%GG'
  • mixed valid and invalid encoding: '%20%GG%41'
  • consecutive percent signs: '%%20'

Each case verifies that url_decode raises the expected error:

Decode url failed

Behavior change

No behavior is changed.

This PR only adds regression test coverage for the existing error behavior of url_decode.

Impact

Test-only change. It does not affect build behavior, runtime behavior, SQL execution logic, storage behavior, or compatibility.

Check

  • Added malformed input cases to the existing url_decode regression test.
  • No core code was modified.
  • No .out file update is required because these are error assertion cases.

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

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.

2 participants