ClickHouse/tests/queries/0_stateless/02518_delete_on_materialized_view.sql
2022-12-29 12:17:44 +01:00

15 lines
454 B
SQL

DROP TABLE IF EXISTS kek;
DROP TABLE IF EXISTS kekv;
CREATE TABLE kek (a UInt32) ENGINE = MergeTree ORDER BY a;
CREATE MATERIALIZED VIEW kekv ENGINE = MergeTree ORDER BY tuple() AS SELECT * FROM kek;
INSERT INTO kek VALUES (1);
DELETE FROM kekv WHERE a = 1; -- { serverError BAD_ARGUMENTS}
SET allow_experimental_lightweight_delete=1;
DELETE FROM kekv WHERE a = 1; -- { serverError BAD_ARGUMENTS}
DROP TABLE IF EXISTS kek;
DROP TABLE IF EXISTS kekv;