Repository navigation
Update parser for ClickHouse 26.8: ALTER, CREATE, ATTACH and DESCRIBE forms - #136
Merged
kyleconroy merged 3 commits intoDec 1, 2026
Conversation
Adds ALTER HANDLER, ALTER ... EXECUTE cmd(args), MODIFY CONSTRAINT, ALTER COLUMN ... TYPE, DROP DETACHED PART, MOVE PART, DELETE IN PARTITION, CLEAR COLUMN IF EXISTS, AUTO_INCREMENT, column TTL without a type, set operations inside IN (...), and trim(...) in codec, index and statistics type slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
CREATE HYPOTHETICAL INDEX, refresh strategy DEPENDS ON/SETTINGS, TO INNER UUID, EMPTY after view storage, SQL SECURITY on tables, RECENT SAMPLES ENGINE for TimeSeries, nested key-value lists in dictionary sources, query parameters as database names in FROM, keyword-named tuple elements and SETTINGS in CREATE TABLE AS table functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
…forms ATTACH TABLE and ATTACH MATERIALIZED VIEW now use the CREATE parser and print as AttachQuery. DESCRIBE accepts bare and unioned queries, table names starting with digits and SETTINGS before FORMAT. Also adds viewIfPermitted(... ELSE ...), DETACH TEMPORARY TABLE [IF EXISTS] and REPLACE TEMPORARY TABLE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4KB7DMX365Nmn5ksnY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Kyle · project thread
Summary
Batch 9 of the ClickHouse 26.8 update. Pending
explain_todostatements go from 518 to 409.ALTER HANDLER,EXECUTE cmd(args),MODIFY CONSTRAINT,ALTER COLUMN ... TYPE,DROP DETACHED PART,MOVE PART,DELETE IN PARTITION,CLEAR COLUMN IF EXISTS.AUTO_INCREMENT, TTL or PRIMARY KEY without a type, keyword-named tuple elements such asTuple(array Array(UInt32)).CREATE HYPOTHETICAL INDEX; refresh strategies withDEPENDS ON,SETTINGS,TO INNER UUIDandEMPTY;SQL SECURITYon tables;RECENT SAMPLES ENGINEfor TimeSeries; nested key-value lists in dictionary sources (headers(header(name ... value ...))); query parameters as database names in FROM;SETTINGSinsideCREATE TABLE AS func(...).ATTACH TABLEandATTACH MATERIALIZED VIEWnow use the CREATE parser and print asAttachQuery, which picks up every CREATE clause.TEMPORARY TABLE.IN ((SELECT ...) UNION ...),trim(BOTH ... FROM ...)in codec, index and statistics type slots,viewIfPermitted(... ELSE ...),DETACH TEMPORARY TABLE,REPLACE TEMPORARY TABLE.Test Plan
go test ./parser/... -timeout 60spasses.go test ./parser/... -check-explainremoved the newly passing statements fromexplain_todo.EXPLAIN AST.Generated by Claude Code