Problem reproduces on inserts into distributed table with such schema:
`CREATE DATABASE shard_1
CREATE TABLE shard_1.test (field_1 UInt8, event_date Date MATERIALIZED today()) ENGINE = MergeTree(event_date, (event_date, field_1), 8192)
CREATE TABLE IF NOT EXISTS test_dist AS shard_1.test ENGINE = Distributed('test_cluster', '','test', cityHash64(event_date))
INSERT INTO default.test_dist (field_1) VALUES(0);`
After that exception of server is falling
`2019.01.09 16:52:58.097140 [ 28 ] {}
I assume problem is somewhere in generated temporary files for distributed tables *.bin, because in the new version of CH they starts from insert script with all columns(including materialized).
In previous version of CH they weren't including materialized columns. This issue fully blocks all insert into the target of the distributed table.
Problem reproduces in version 18.16.1 (in 18.14.13 everything is ok)
For me it works in 18.14.15 and doesn't work in 18.14.17 (18.14.16 is missing from apt repository).
Probally this regresssion is caused by #3673
But more curius is why an existing test is altered from MATERIALIZED to DEFAULT instead of a new test added.
https://github.com/yandex/ClickHouse/pull/3673/files#diff-0ea8877ed15b4be113be1a0b231dbc3aR22
This bug is blocker for our CH update =(
The same bug is not reproduced for columns with 'DEFAULT'. As a work around existing table can be recreated with this specifier if restriction on manual value insertion is not critical. Also insert_allow_materialized_columns setting helps
@alexey-milovidov @ztlpn This bug is blocking us from upgrading to newer versions; Is it possible to fix or revert the changes done by #3673 since it clearly causing this regression
Hitting this as well. Tried setting insert_allow_materialized_columns but did not help on 19.5.2 revision 54417
Edit: it looks like it's a client-specific setting? How do I set this server wide and persist it? I don't see anything in the docs.
Most helpful comment
This bug is blocker for our CH update =(