Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dictGet support for clickhouse code formatter #888

Open
mbtolou opened this issue Dec 9, 2021 · 3 comments
Open

dictGet support for clickhouse code formatter #888

mbtolou opened this issue Dec 9, 2021 · 3 comments
Labels
feature request New issue opened using "Feature request" template formatting

Comments

@mbtolou
Copy link

mbtolou commented Dec 9, 2021

hi.

CREATE TABLE ahe.up_daily_data (
	`device_id` String COMMENT 'device_id',
	`clock` DateTime('Asia/Tehran') COMMENT 'clock ',
	`pt_text` Nullable(String) MATERIALIZED dictGet(
		'ahe.tbl_meters_dict',
		'pt_text',
		tuple(device_id)
	)
) ENGINE = AggregatingMergeTree PARTITION BY toYYYYMM(clock)
ORDER BY (clock, device_id) SETTINGS index_granularity = 8192;

above code no format to this :

CREATE TABLE ahe.up_daily_data (
   `device_id` String COMMENT 'device_id',
   `clock` DateTime('Asia/Tehran') COMMENT 'clock ',
   `pt_text` Nullable(String) MATERIALIZED dictGet('ahe.tbl_meters_dict','pt_text',tuple(device_id))
) 
ENGINE = AggregatingMergeTree 
PARTITION BY toYYYYMM(clock)
ORDER BY (clock, device_id) 
SETTINGS index_granularity = 8192;

https://vscode-sqltools.mteixeira.dev/playground/formatter

@mbtolou mbtolou added the triage label Dec 9, 2021
@gjsjohnmurray gjsjohnmurray added feature request New issue opened using "Feature request" template and removed triage labels Sep 28, 2022
@numfin
Copy link

numfin commented Feb 5, 2024

Is there any movement on this feature?

@gjsjohnmurray
Copy link
Collaborator

Nothing at the moment, nor any work scheduled on it.

@numfin
Copy link

numfin commented Feb 14, 2024

@gjsjohnmurray it would be nice to have minimal working formatting.
For help there is already cli for it https://clickhouse.com/docs/en/operations/utilities/clickhouse-format
But it would be nice to have vscode extension for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template formatting
Projects
None yet
Development

No branches or pull requests

3 participants