Skip to content

Support function expressions in table settings - #317

Merged
git-hulk merged 1 commit into
AfterShip:masterfrom
sharadgaur:support-function-table-settings
Aug 28, 2026
Merged

Support function expressions in table settings#317
git-hulk merged 1 commit into
AfterShip:masterfrom
sharadgaur:support-function-table-settings

Conversation

@sharadgaur

Copy link
Copy Markdown
Contributor

What

Allow table SETTINGS values to use expressions in addition to scalar literals.

This adds support for ClickHouse table-disk definitions such as:

SETTINGS disk = disk(
    type = 's3_plain_rewritable',
    endpoint = 'from_env OBJECT_STORAGE_ENDPOINT',
    readonly = true
)

It also supports nested disk definitions used by cached reader tables.

Why

The parser currently rejects function expressions in table settings:

unexpected token: "disk", expected <number>, <bool> or <string>

This prevents callers from parsing SHOW CREATE TABLE output for tables using s3_plain_rewritable and cache disks.

Validation

  • go test ./... -count=1
  • Added coverage for function and nested-function setting values

go vet ./... still reports the existing Formatter.WriteByte signature warning in parser/format.go.

@git-hulk
git-hulk merged commit e0b3df6 into AfterShip:master Aug 28, 2026
1 check passed
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.

2 participants