saiswapnilar-stripe opened a new issue, #17615: URL: https://github.com/apache/pinot/issues/17615
Previously, a Calcite upgrade led to the following issue: https://github.com/apache/pinot/issues/16295 because new reserved keywords were added to Calcite, causing parsing errors. I'd like to add a new REST endpoint to the broker that just parses a query with no further validation/execution, which can be used in testing workflows to catch any syntax issue early in the upgrade cycle. While there are already similar endpoints in the API that do not execute a query, they do more than just parse validation. **`POST /query/sql/queryFingerprint`** (Broker) - https://github.com/saiswapnilar-stripe/pinot/blob/master/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java#L216 - generates a fingerprint after parsing the query **`POST /validateMultiStageQuery`** (Controller) - https://github.com/saiswapnilar-stripe/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java#L202 - Performs further validation after parsing, is also only for MSE queries. Proposed solution: Add a new `POST /query/sql/validateSyntax` endpoint to the broker that: - Only parses the query using Calcite's SQL parser (same parser used for execution) - Returns a boolean validation result with error details if parsing fails - Supports both single-stage and multi-stage queries - Does not require table metadata, schema validation, or query execution - Provides fast, lightweight syntax checking -- 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]
