Skip to content

Conversation

@jspeedz
Copy link

@jspeedz jspeedz commented Oct 30, 2025

Removes 'FORMAT JSON' from CREATE, DROP, ALTER and RENAME statements when executing queries 'ON CLUSTER'.

Specifying output format is only supported for SELECT and INSERT statements.
See: https://clickhouse.com/docs/interfaces/formats

Fixes: #241

This PR differs from #214, which is stale / conflicts with the latest version.
This PR only inverts the logic that does not work as intended, it does not add an extra parameter to the write() method like #214.

This change/fix works for my particular use-case. But do not know if I am missing something. Please discuss if this is the correct fix. We might want to make the 'FORMAT JSON' forced format statement optional as in #214. Or maybe we should allow-list SELECT/INSERT statements instead of deny-listing.

@jspeedz jspeedz changed the title fix: Remove 'FORMAT JSON' from CREATE, DROP, ALTER and RENAME queries fix: Remove 'FORMAT JSON' from CREATE, DROP, ALTER and RENAME statements Oct 30, 2025
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.

ALTER / CREATE / DROP / RENAME queries fail when using ON CLUSTER

1 participant