Skip to content

Spark: Allow a semicolon after CACHE TABLE without a query - #2985

Open
colinthebomb1 wants to merge 1 commit into
apache:mainfrom
colinthebomb1:spark-cache-table-semicolon
Open

colinthebomb1 wants to merge 1 commit into
apache:mainfrom
colinthebomb1:spark-cache-table-semicolon

Conversation

@colinthebomb1

Copy link
Copy Markdown

Fixes #2801

CACHE TABLE t; SELECT 1 failed with Expected: a QUERY statement, found: ;. The query is optional for Spark and Databricks in CACHE TABLE statements https://spark.apache.org/docs/latest/sql-ref-syntax-aux-cache-cache-table.html.

Fixed by checking for a semicolon or EOF as end of input when parsing CACHE TABLE statements with no query.

Claude Code was used to help make this PR

Dialects: Spark, Databricks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spark/Databricks: CACHE TABLE t; is rejected (only EOF ends the optional query)

1 participant