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

Could we specify column type, aggregation function and compression on materialized view? #303

Open
hueiyuan opened this issue Jun 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hueiyuan
Copy link

hueiyuan commented Jun 28, 2024

Describe the bug

As topic, Could we specify column type and compression on materialized view?

Following the below example table:

CREATE TABLE IF NOT EXISTS db.mv_table ON CLUSTER '{cluster}'
(
    dt_day DateTime CODEC(Delta, ZSTD(1)),
    team_id LowCardinality(String) CODEC(ZSTD(1)),
    "le_accumulate" SimpleAggregateFunction(sum, Float64),
.......
)ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/clusters/{cluster}/databases/{database}/tables/{table}/{shard}', '{replica}')
PARTITION BY (toYYYYMMDD(dt_day))

How do we create materialized_view and specify column type as like LowCardinality(String) or compression as CODEC(ZSTD(1)) as the same time? Additionally, how to we specify SimpleAggregateFunction(sum, Float64) during create materialized_view

If have any ideas can solve this, I will be appreciated it.

@hueiyuan hueiyuan added the bug Something isn't working label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant