-
Notifications
You must be signed in to change notification settings - Fork 8.3k
19.15.3.6 distributed+ReplicatedMergeTree table can not write to materialized columns #7365
Description
I made a 3 machine clusters with latest 19.15.3.6 on Ubuntu 18.04 LTS
and made a distributed table like
create table rdlog
(
act String,
campaignId Int32,
... // omit columns
date String materialized formatDateTime(toDateTime(timestamp / 1000), '%y%m%d%H'),
eventTime DateTime materialized toDateTime(timestamp / 1000)
)
engine = ReplicatedMergeTree('/clickhouse/tables/{shard}/rdlog', '{replica}') PARTITION BY toYYYYMMDD(eventTime) ORDER BY (eventTime, traceId) SAMPLE BY traceId SETTINGS index_granularity = 8192;
and
create table rdlog_all
(
act String,
campaignId Int32,
... // omit columns
date String materialized formatDateTime(toDateTime(timestamp / 1000), '%y%m%d%H'),
eventTime DateTime materialized toDateTime(timestamp / 1000)
)
engine = Distributed(rd2_cluster, 'default', 'rdlog', rand());
when I launched the ingest process, there were tons of errors like
executeQuery: Code: 10, e.displayText() = DB::Exception: Not found column date in block
and you see the data column was a materialized one,
I checked the metadata in zk and found date column
And when I downgrade to 19.14.7.15 stable it worked again as expected.
hope to be fixed soon, thanks