xiangfu0 opened a new pull request, #19544: URL: https://github.com/apache/pinot/pull/19544
`POST /sql/ddl` currently reports HTTP 500 when a registered `TableConfigValidator` rejects a configuration with `ConfigValidationException`, although the validation SPI specifies HTTP 400. Handle that exception with the existing configuration errors and preserve the validator's rejection message. Unexpected validator exceptions continue to return HTTP 500. The regression test calls the actual controller endpoint for live and dry-run CREATE requests, verifies both exception categories, and checks that neither the table config nor schema was persisted. ## Reproduction 1. Register a `TableConfigValidator` that throws `ConfigValidationException` for a selected table. 2. Submit `CREATE TABLE <name> (id INT) TABLE_TYPE = OFFLINE` to `POST /sql/ddl`, with either `dryRun=false` or `dryRun=true`. 3. Before this fix both requests return HTTP 500; they now return HTTP 400 with the validator's message. The new four-case regression was run against the unchanged production code at `66fca21494`: exactly the two configuration-rejection cases failed with expected 400 / actual 500. The unexpected-exception cases passed. ## Validation JDK 25: ```sh ./mvnw -pl pinot-controller -am -Ppinot-fastdev -Dtest=PinotDdlRestletResourceTest -Dsurefire.failIfNoSpecifiedTests=false test ``` All 22 tests passed, with no failures, errors, or skips. Affected-module `spotless:apply`, `license:format`, `checkstyle:check`, and `license:check` passed separately; `git diff --check` passed. Warning-enabled reactor compilation initially stopped in unchanged `ZstandardDecompressor.java:51` because `org.jetbrains.annotations.NotNull` was absent from its compile classpath. Normal reactor compilation and tests passed without any dependency workaround. The subsequent warning-enabled incremental `test-compile` passed with classes already up to date, so it supplied no fresh warning output. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
