V2.1.4创建异步物化视图失败

Viewed 55

基表

CREATE TABLE `t1` (
  `k1` LARGEINT NOT NULL,
  `k2` DATE NOT NULL
) ENGINE=OLAP
DUPLICATE KEY(`k1`)
DISTRIBUTED BY RANDOM BUCKETS 3
CREATE TABLE `t2` (
  `k1` LARGEINT NOT NULL,
  `k3` DATE NOT NULL
) ENGINE=OLAP
DUPLICATE KEY(`k1`)
DISTRIBUTED BY RANDOM BUCKETS 3

创建物化视图

SET global enable_nereids_planner = true;
CREATE MATERIALIZED VIEW mv1 
   BUILD IMMEDIATE
   REFRESH COMPLETE ON 'COMMIT' 
   DISTRIBUTED BY HASH keys=k1 BUCKETS 10 AS
SELECT
 t1.k1, t2.k3
FROM t1 LEFT JOIN t2 ON t1.k1=t2.k1

错误
Execution failed: Error Failed to execute sql: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Syntax error in line 2: ...ATERIALIZED VIEW mv1 BUILD IMMEDIATE REFRESH COMP... ^ Encountered: BUILD Expected

2 Answers

这块应该是语法问题 ,DISTRIBUTED BY HASH(traffic_order_no) BUCKETS 2

set global experimental_enable_nereids_planner = true;
也是同样的错误