Skip to content

fix: accept optional colon in Spark struct DDL - #969

Open
cnbei wants to merge 1 commit into
sql-formatter-org:masterfrom
cnbei:cursor/spark-struct-colon-c6b6
Open

fix: accept optional colon in Spark struct DDL#969
cnbei wants to merge 1 commit into
sql-formatter-org:masterfrom
cnbei:cursor/spark-struct-colon-c6b6

Conversation

@cnbei

@cnbei cnbei commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #900

Spark SHOW CREATE TABLE can emit struct field types as struct <c: bigint> with an optional colon. The spark dialect threw a parse error on that colon. Accept the optional colon and add spark.test.ts coverage.

Spark SHOW CREATE TABLE emits STRUCT<field: type> with an optional
colon. Treat ':' as a spark operator and combine ARRAY/MAP/STRUCT
angle-bracket types so the dialect can parse and format that DDL.

Fixes sql-formatter-org#900

Co-authored-by: cnbei <baymy@foxmail.com>
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.

spark ddl with struct data type error

2 participants