Skip to content

Fix #17615: Add broker endpoint to parse SQL queries without execution#17661

Open
Gautam-aman wants to merge 1 commit intoapache:masterfrom
Gautam-aman:fix-17615
Open

Fix #17615: Add broker endpoint to parse SQL queries without execution#17661
Gautam-aman wants to merge 1 commit intoapache:masterfrom
Gautam-aman:fix-17615

Conversation

@Gautam-aman
Copy link

Description

This PR adds a new parse-only SQL endpoint to the Pinot Broker that validates SQL syntax without planning or executing the query.

The endpoint allows SQL parsing to be tested independently and helps catch parser regressions early, especially during SQL / Calcite upgrades.

Motivation

Currently, SQL parsing errors can only be detected during query execution. This makes it difficult to isolate parser-level regressions.

Issue #17615 requested a broker endpoint that only parses SQL and reports success or failure without executing the query.

Changes

  • Added a new broker REST endpoint:
    • POST /query/parse
    • Parses SQL syntax only
    • Returns HTTP 200 for valid SQL
    • Returns HTTP 400 with error message for invalid SQL
  • Added unit tests covering valid and invalid SQL parsing

Testing

  • Added QueryParseResourceTest
  • Tests executed locally using:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant