Skip to content

Apache Flink SQL Parser Support in GSP

Explore the Apache Flink SQL Parser product page

Apache Flink SQL is the SQL layer of the Apache Flink stream-processing framework, used to define streaming and batch pipelines with standard SQL plus streaming extensions such as CREATE TABLE ... WITH (...) connector definitions, watermarks, and windowing table-valued functions.

General SQL Parser (GSP) parses Flink SQL with a dedicated grammar, so Flink jobs can be analyzed offline: full AST access, syntax validation, formatting, and column-level data lineage across streaming pipelines. This makes GSP suitable for building lineage and impact analysis over Flink-based data platforms.

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

Syntax Coverage Corpus

GSP tests Flink SQL syntax against 39 documented constructs grouped into 11 categories, each cross-referenced to the documentation that defines it (22 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 Flink SQL 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 39 (97%) 127 of 129 (98%)
SELECT (queries) 12 of 13 (92%) 42 of 44 (95%)
DML (INSERT / UPDATE / DELETE / MERGE) 2 of 2 (100%) 6 of 6 (100%)
Stored procedures 1 of 1 (100%) 5 of 5 (100%)

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 39 constructs

Construct Category Parses Specified in
ALTER DATABASE ALTER all 1 Flink docs
ALTER FUNCTION ALTER all 2 Flink docs
ALTER TABLE ALTER all 6 Flink docs
ALTER VIEW ALTER all 2 Flink docs
CREATE CATALOG CREATE all 2 Flink docs
CREATE DATABASE CREATE all 2 Flink docs
CREATE FUNCTION CREATE all 5 Flink docs
CREATE TABLE CREATE all 6 Flink docs
CREATE TABLE AS SELECT CREATE all 2 Flink docs
CREATE TABLE LIKE CREATE all 2 Flink docs
CREATE VIEW CREATE all 2 Flink docs
DESCRIBE DESCRIBE all 5 Flink docs
DROP CATALOG DROP all 1 Flink docs
DROP DATABASE DROP all 2 Flink docs
DROP FUNCTION DROP all 2 Flink docs
DROP TABLE DROP all 2 Flink docs
DROP VIEW DROP all 2 Flink docs
EXPLAIN EXPLAIN all 3 Flink docs
EXECUTE STATEMENT SET INSERT all 3 Flink docs
INSERT INSERT all 5 Flink docs
RESET RESET all 2 Flink docs
SELECT SELECT all 6 Flink docs
SELECT Group Aggregation SELECT all 5 Flink docs
SELECT JOIN SELECT all 6 Flink docs
SELECT Lateral Table Join SELECT all 2 Flink docs
SELECT LIMIT SELECT all 1 Flink docs
SELECT MATCH_RECOGNIZE SELECT 0 of 2 Flink docs
SELECT ORDER BY SELECT all 1 Flink docs
SELECT Over Aggregation SELECT all 3 Flink docs
SELECT Set Operations SELECT all 6 Flink docs
SELECT Top-N SELECT all 1 Flink docs
SELECT Window Aggregation SELECT all 5 Flink docs
SELECT Windowing TVF (TUMBLE, HOP, CUMULATE, SESSION) SELECT all 6 Flink docs
SELECT WITH (Common Table Expression) SELECT all 1 Flink docs
SET SET all 2 Flink docs
SHOW SHOW all 6 Flink docs
SHOW CREATE, SHOW FUNCTIONS SHOW all 6 Flink docs
SHOW TABLES SHOW all 6 Flink docs
USE USE all 5 Flink docs