Skip to content

feat(webui): Set up ANTLR tooling for future client-side SQL parsing; Move clp-s parser generation to codegen.yaml; Remove unused client package-lock.json. - #1293

Merged
hoophalab merged 24 commits into
y-scope:mainfrom
hoophalab:sqlparser
Sep 15, 2025

Conversation

@hoophalab

@hoophalab hoophalab commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Description

  1. Add the ANTLR dependency in the webui client.
  2. Use the grammar file from the 0.293 release of the Presto repository
    https://github.com/prestodb/presto/blob/release-0.293/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4
    permalink: https://github.com/prestodb/presto/blob/2f48ff63a3d6d249b4062546003126ddbbb989ee/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4
  3. Include the generated parser files directly in the codebase similar to refactor(clp-s): Add ANTLR-generated parsers to codebase to eliminate need for code dependencies at build time. #925.
  4. Add an example validate function for SQL input.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

validate detects incorrect sql queries.
clp-s-generate-parsers works the same as before.
webui-generate-parser generates the parser correctly.

Summary by CodeRabbit

  • New Features

    • Introduced SQL syntax validation in the web UI with case-insensitive parsing and clear line/column error messages.
  • Chores

    • Added a new runtime dependency to support the parser.
    • Centralized and automated parser code generation via shared tasks.
    • Updated CI workflow to use the new codegen task.
    • Excluded generated files from linting to reduce noise.
    • Updated notices to include third‑party attribution.

Loading
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.

4 participants