sivakumar-mahalingam opened a new pull request, #4372:
URL: https://github.com/apache/amoro/pull/4372

   ## Why are the changes needed?
   
   `AmsThriftUrl` lowercased the complete input URL during parsing, which could 
modify case-sensitive components such as catalog paths and query parameter 
values. Thrift URL validation also did not clearly handle unsupported schemes, 
missing hosts, or missing/invalid ports.
   
   Fix #4232.
   
   ## Brief change log
   
   * Preserve the original case of hosts, catalog paths, query parameter 
values, and URLs.
   * Compare thrift and ZooKeeper schemes case-insensitively.
   * Add validation for thrift scheme, host, and port with clearer error 
messages.
   * Consolidate duplicated `socketTimeout` query parsing.
   * Keep existing public APIs unchanged.
   * Add unit tests for valid and invalid thrift and ZooKeeper URL scenarios.
   
   ## 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
   
   The following tests were run locally:
   
   ```powershell
   .\mvnw.cmd -pl amoro-common -Dtest=TestAmsThriftUrl test
   ```
   
   Result:
   
   ```text
   Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
   
   ------------------------------------------------------------------------
   BUILD SUCCESS
   ------------------------------------------------------------------------
   ```
   
   The tests cover:
   
   * Mixed-case thrift schemes.
   * Lowercase thrift URLs.
   * Case preservation for URL components.
   * `socketTimeout` parsing.
   * Unsupported schemes.
   * Missing hosts.
   * Missing ports.
   * Invalid ports.
   * ZooKeeper URL and timeout handling.
   
   ## 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]

Reply via email to