apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.95k stars 3.14k forks source link

[Enhancement] Test to prohibit importing data into mtmv #36301

Open zfr9527 opened 1 month ago

zfr9527 commented 1 month ago

Search before asking

Description

We have added the mtmv function, and at the same time we have disabled the operation of directly importing data into mtmv, including operations such as insert/load. Here, it is necessary to supplement the test case where all load operations are prohibited from importing data into mtmv. The example of insert is as follows.

Solution

CREATE TABLE t1 ( k1 TINYINT, k2 INT not null ) DISTRIBUTED BY HASH(k2) BUCKETS 2 PROPERTIES ( "replication_num" = "1" );

CREATE MATERIALIZED VIEW mv1 BUILD DEFERRED REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ( 'replication_num' = '1' ) AS SELECT * from t1;

// insert into mtmv test { sql """insert into mv1 values(1,1)""" exception "Not allowed" }

Are you willing to submit PR?

Code of Conduct

dataroaring commented 1 month ago

stream load, http stream, s3 load, routineload, mysqload