Repository navigation
Closed
Labels
comp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...comp-materialized-viewMaterialized views: insert-triggered MV pipeline, insert dependencies, deduplication.unexpected behaviourResult is unexpected, but not entirely wrong at the same time.
Description
i created first table:
CREATE TABLE test.a ( a UInt64, b UInt64) ENGINE = TinyLog;
then second one:
CREATE TABLE test.b ( b UInt64) ENGINE = TinyLog;
then a materialized view with some random SQL:
CREATE MATERIALIZED VIEW test.view_4 ( bb UInt64, cnt UInt64) POPULATE AS
SELECT
bb,
count() AS cnt
FROM
(
SELECT
a,
b AS j,
b AS bb
FROM
test.a ANY
INNER JOIN
(
SELECT
b AS j,
b AS bb
FROM
b
)
USING (j)
)
GROUP BY
bb;then i run an SQL to insert data into "a" table:
insert into a (a,b) values (1,2);
and got an error:
Received exception from server:
Code: 10. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Not found column bb in block. There are only columns: a, b.
That's probably bad.
Some thoughts:
apart from i cannot really understand why there's an error, it could be nice if materialized views didn't prevent from inserting data into original tables (when, for example, there's smth wrong with sql)
Reacted by András Fülöp
Metadata
Metadata
Assignees
Labels
comp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...comp-materialized-viewMaterialized views: insert-triggered MV pipeline, insert dependencies, deduplication.unexpected behaviourResult is unexpected, but not entirely wrong at the same time.
Activity
hatarist commentedon Feb 3, 2017
Perhaps related? #127
bozerkins commentedon Feb 3, 2017
possible
blinkov commentedon Jul 13, 2018
Still reproducible with recent clickhouse-server.
Fix materialized view with column defaults.
Fix materialized view with column defaults.
filimonov commentedon Nov 25, 2019
Still here at 19.18.1-testing:
knoguchi commentedon Mar 23, 2020
It worked in 20.3.4.10. Btw table b needs data before
insert into ato trigger the MV.JosephRedfern commentedon Mar 17, 2024
I think this issue has been resolved, I can't reproduce under ClickHouse server version 24.3.1.
Close: #448