hutiefang76 opened a new pull request, #4404: URL: https://github.com/apache/amoro/pull/4404
## Why are the changes needed? The optimizer and optimizing-table list endpoints pass non-positive page/pageSize and overflowing offsets to their downstream managers. Validate the query ranges before reading data, using the existing Javalin Validator. Fix #4401. ## Brief change log - Require positive page and pageSize in getOptimizers and getOptimizerTables. - Check the offset bound using long arithmetic while retaining the existing int query interface. - Add tests using the real validators for both endpoints, plus default parameters, sorting, group selection, distinct limit/offset arguments and valid integer-boundary pagination. ## How was this patch tested? - [x] New positive and negative cases: 19 passed. - [x] Existing TestOptimizerGroupController regression: 12 passed. - [x] Local tests, Spotless and Checkstyle passed with Java 11 and Java 17; no skips. - Original production code fails all 10 invalid-input cases. - Also ran the same selected tests after `clean` with `-Pjava11,skip-dashboard-build`. - Command: `./mvnw -B -ntp -Pjava17,skip-dashboard-build -pl amoro-ams -am -Dsurefire.failIfNoSpecifiedTests=false -Dtest=TestOptimizerGroupPagination,TestOptimizerGroupController test`. - The full suite and HTTP/browser acceptance were not run locally. ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable ## AI assistance Code was assisted by DeepSeek v4 Flash via Reasonix 1.39.4; submission text was assisted by Codex. The patch and local test results were reviewed. -- 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]
