starrocks
starrocks copied to clipboard
[sync materialized view]not refresh after truncate base table
Steps to reproduce the behavior (Required)
CREATE TABLE `t2` (
`k1` date,
`k2` int,
`k3` int
) ENGINE=OLAP
DUPLICATE KEY(`k1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`k1`) BUCKETS 3;
INSERT INTO t2 VALUES ("2020-11-10",3,3);
CREATE MATERIALIZED VIEW mv1
DISTRIBUTED BY HASH(k1) BUCKETS 10
REFRESH ASYNC
AS SELECT k1,k2 from t2;
TRUNCATE TABLE t2;
select * from mv1;
Expected behavior (Required)
Empty set (0.01 sec)
Real behavior (Required)
+------------+------+
| k1 | k2 |
+------------+------+
| 2020-11-10 | 3 |
+------------+------+
StarRocks version (Required)
- You can get the StarRocks version by executing SQL
select current_version()
+----------------------------+
| current_version() |
+----------------------------+
| BRANCH-2.4-RELEASE f823e8b |
+----------------------------+
LGTM @Astralidea