slfan1989 opened a new pull request, #4233:
URL: https://github.com/apache/amoro/pull/4233
## Why are the changes needed?
Close #4232.
`AmsThriftUrl` is used to parse AMS thrift and ZooKeeper URLs. The previous
thrift URL parsing lowercased the whole URL before parsing, which could
unexpectedly change case-sensitive parts such as catalog names or query values.
This patch improves URL parsing robustness by preserving the original URL
case and adding clearer validation for invalid thrift URLs.
## Brief change log
- Avoid lowercasing the whole thrift URL during parsing.
- Keep URL scheme matching case-insensitive.
- Preserve host, catalog name, and query value case.
- Add explicit validation for thrift URL:
- unsupported scheme
- missing host
- missing port
- Extract shared `socketTimeout` query parsing logic.
- Make `socketTimeout` parameter name case-insensitive.
- Add `TestAmsThriftUrl` unit tests.
## How was this patch tested?
- [X] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [X] Run test locally before making a pull request
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]