Skip to content

Apache Doris SQL Parser Support in GSP

Explore the Apache Doris SQL Parser product page

Apache Doris is an open-source, MPP-based real-time analytical database that speaks a largely MySQL-compatible SQL dialect while adding its own DDL for data models, partitioning, and materialized views.

General SQL Parser (GSP) parses Apache Doris SQL with a dedicated grammar, producing a full AST that supports offline syntax validation, SQL formatting, and column-level data lineage for Doris queries and DDL. Because Doris syntax diverges from stock MySQL in areas like CREATE TABLE distribution clauses, using the dedicated Doris dialect gives more accurate results than parsing as MySQL.

See the Apache Doris Keyword Compatibility Reference for which keywords can appear as unquoted identifiers.

Syntax Coverage Corpus

GSP tests Apache Doris syntax against 46 documented constructs grouped into 17 categories, each cross-referenced to the documentation that defines it (40 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 Apache Doris 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 38 of 46 (83%) 123 of 134 (92%)
SELECT (queries) 5 of 8 (63%) 17 of 21 (81%)
DML (INSERT / UPDATE / DELETE / MERGE) 3 of 4 (75%) 16 of 17 (94%)
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 46 constructs

Construct Category Parses Specified in
ALTER TABLE COLUMN ALTER all 5 Doris docs
ALTER TABLE PARTITION ALTER all 4 Doris docs
ALTER TABLE PROPERTY ALTER all 6 Doris docs
ALTER TABLE RENAME ALTER all 4 Doris docs
ALTER VIEW ALTER all 1 Doris docs
CREATE ASYNC MATERIALIZED VIEW CREATE all 1 Doris docs
CREATE DATABASE CREATE all 3 Doris docs
CREATE INDEX CREATE all 2 Doris docs
CREATE MATERIALIZED VIEW CREATE all 1 Doris docs
CREATE TABLE CREATE all 6 Doris docs
CREATE TABLE AGGREGATE KEY CREATE all 2 Doris docs
CREATE TABLE AS SELECT CREATE all 1 Doris docs
CREATE TABLE DYNAMIC PARTITION CREATE all 1 Doris docs
CREATE TABLE PARTITION BY LIST CREATE all 2 Doris docs
CREATE TABLE PARTITION BY RANGE CREATE all 3 Doris docs
CREATE USER CREATE all 5 Doris docs
CREATE VIEW CREATE all 2 Doris docs
DELETE DELETE 4 of 5 Doris docs
DESCRIBE DESCRIBE 1 of 3 Doris docs
DROP DATABASE DROP all 2 Doris docs
DROP MATERIALIZED VIEW DROP 0 of 2 Doris docs
DROP TABLE DROP all 2 Doris docs
DROP VIEW DROP all 1 Doris docs
EXPLAIN EXPLAIN all 2 Doris docs
EXPORT EXPORT all 4 Doris docs
GRANT GRANT all 6 Doris docs
INSERT INSERT all 6 Doris docs
INSERT OVERWRITE INSERT all 3 Doris docs
BROKER LOAD LOAD all 3 Doris docs
REVOKE REVOKE all 4 Doris docs
SELECT SELECT 5 of 6 Doris docs
SELECT CTE SELECT all 2 Doris docs
SELECT GROUPING SETS SELECT 2 of 3 Doris docs
SELECT INTO OUTFILE SELECT 0 of 2 Doris docs
SELECT JOIN SELECT all 4 Doris docs
SELECT LATERAL VIEW SELECT all 1 Doris docs
SELECT UNION SELECT all 2 Doris docs
SELECT WINDOW FUNCTION SELECT all 1 Doris docs
SET VARIABLE SET all 3 Doris docs
SHOW CREATE TABLE SHOW 1 of 2 Doris docs
SHOW DATABASES SHOW all 2 Doris docs
SHOW PARTITIONS SHOW 3 of 4 Doris docs
SHOW TABLES SHOW all 3 Doris docs
TRUNCATE TABLE TRUNCATE all 2 Doris docs
UPDATE UPDATE all 3 Doris docs
USE USE all 2 Doris docs