Skip to content

Apache Spark SQL Syntax Support

This page documents the SQL syntax support for Apache Spark SQL in the General SQL Parser.

Syntax Coverage Corpus

GSP tests Spark SQL syntax against 70 documented constructs grouped into 19 categories, each cross-referenced to the specific page in Spark SQL's own documentation that defines it (69 distinct source pages).

Parse coverage

Measured on 2026-07-25 against GSP Java 4.1.5.15, the current release. Each construct carries the complete set of examples from Spark SQL's documentation; a construct counts as fully covered only when every one of its examples parses.

Constructs Individual statements
Fully parsed 69 of 70 (99%) 241 of 243 (99%)

Statements are split using the parser's own statement splitter, so multi-statement examples and procedure bodies are counted correctly.

Categories covered

Category Constructs
SELECT 21
SHOW 9
CACHE 6
DESCRIBE 4
DROP 4
INSERT 4
ALTER 3
CREATE 3
CREATE DATASOURCE 3
ADD 2
LIST 2
SET 2
ANALYZE 1
EXPLAIN 1
LOAD 1
REPAIR 1
RESET 1
TRUNCATE 1
USE 1

Full construct lists are being published progressively; see Sybase, PostgreSQL or MySQL.

Key Features Supported

  • Standard SQL operations (SELECT, INSERT, UPDATE, DELETE)
  • Spark SQL-specific functions and data types
  • DataFrame and Dataset operations
  • Window functions and analytical queries
  • Streaming SQL operations
  • Delta Lake and data lake integrations