Skip to content

StarRocks SQL Parser Support in GSP

Explore the StarRocks SQL Parser product page

StarRocks is an open-source, MPP OLAP database (a Linux Foundation project) built for sub-second analytics on real-time and batch data. It exposes a MySQL-compatible protocol and SQL surface while adding its own DDL for table types, distribution, and materialized views.

General SQL Parser (GSP) parses StarRocks SQL with a dedicated grammar, so StarRocks workloads get full AST access, offline syntax validation, SQL formatting, and column-level data lineage — including StarRocks-specific DDL that a generic MySQL parser would reject.

See the StarRocks Keyword Compatibility Reference for keyword-as-identifier support.

Syntax Coverage Corpus

GSP tests StarRocks syntax against 40 documented constructs grouped into 16 categories, each cross-referenced to the documentation that defines it (36 distinct source pages).

Parse coverage

Measured against GSP Java 4.1.11 on 2026-08-10 (UTC) (artifact sha256 71895b6e5ab0). Each construct below carries the complete set of examples from the StarRocks documentation; a construct counts as fully covered only when every one of its examples parses. Percentages are pass rates over this documented-example corpus — not a percentage of the entire SQL dialect.

Constructs fully parsed Individual statements parsed
All constructs 34 of 40 (85%) 99 of 109 (91%)
SELECT (queries) 4 of 5 (80%) 20 of 21 (95%)
DML (INSERT / UPDATE / DELETE / MERGE) 0 of 3 (0%) 6 of 13 (46%)
Stored procedures

Statements are split using the parser's own statement splitter, so multi-statement examples and procedure bodies are counted correctly. The SELECT, DML and stored-procedure rows classify each statement by its parsed statement type: a construct is counted in a row when its examples contain at least one statement of that class, and is fully parsed when all of them parse. Stored procedures covers CREATE PROCEDURE / FUNCTION / PACKAGE / TRIGGER definitions and anonymous blocks.

Machine-readable: dialect data (JSON) · all-dialect matrix · coverage matrix overview

All 40 constructs

Construct Category Parses Specified in
ALTER MATERIALIZED VIEW ALTER all 3 StarRocks docs
ALTER TABLE ALTER all 6 StarRocks docs
ALTER TABLE (PARTITION) ALTER all 3 StarRocks docs
ALTER VIEW ALTER all 1 StarRocks docs
CREATE DATABASE CREATE all 2 StarRocks docs
CREATE INDEX CREATE all 2 StarRocks docs
CREATE MATERIALIZED VIEW (ASYNCHRONOUS REFRESH) CREATE all 2 StarRocks docs
CREATE MATERIALIZED VIEW (SYNCHRONOUS) CREATE all 1 StarRocks docs
CREATE TABLE CREATE all 1 StarRocks docs
CREATE TABLE (AGGREGATE KEY) CREATE all 1 StarRocks docs
CREATE TABLE (DISTRIBUTED BY HASH / RANDOM) CREATE all 2 StarRocks docs
CREATE TABLE (EXPRESSION PARTITIONING) CREATE all 2 StarRocks docs
CREATE TABLE (PARTITION BY RANGE) CREATE all 2 StarRocks docs
CREATE TABLE (PRIMARY KEY) CREATE all 1 StarRocks docs
CREATE TABLE (UNIQUE KEY) CREATE all 1 StarRocks docs
CREATE TABLE AS SELECT CREATE all 3 StarRocks docs
CREATE VIEW CREATE all 2 StarRocks docs
DELETE DELETE 2 of 4 StarRocks docs
DESCRIBE DESCRIBE 1 of 2 StarRocks docs
DROP DATABASE DROP all 2 StarRocks docs
DROP MATERIALIZED VIEW DROP all 2 StarRocks docs
DROP TABLE DROP all 3 StarRocks docs
DROP VIEW DROP all 2 StarRocks docs
EXPLAIN EXPLAIN all 3 StarRocks docs
GRANT GRANT all 4 StarRocks docs
INSERT INSERT 3 of 6 StarRocks docs
REVOKE REVOKE all 3 StarRocks docs
SELECT SELECT all 5 StarRocks docs
SELECT (CTE) SELECT all 2 StarRocks docs
SELECT (JOIN) SELECT 4 of 5 StarRocks docs
SELECT (UNION / INTERSECT / EXCEPT) SELECT all 5 StarRocks docs
SELECT (WINDOW FUNCTIONS) SELECT all 4 StarRocks docs
SET SET all 4 StarRocks docs
SHOW CREATE TABLE SHOW all 2 StarRocks docs
SHOW PARTITIONS SHOW 2 of 3 StarRocks docs
SHOW TABLES SHOW all 3 StarRocks docs
SUBMIT TASK SUBMIT all 3 StarRocks docs
TRUNCATE TABLE TRUNCATE all 2 StarRocks docs
UPDATE UPDATE 1 of 3 StarRocks docs
USE USE all 2 StarRocks docs