想创建个分组统计数据行数的物化视图 CREATE MATERIALIZED VIEW view_kafka_yc_gps_info as select user_id, to_date(gdt) as summary_date, count(0) as data_count from kafka_yc_gps_info group by user_id,summary_date order by user_id,summary_date; 报错如下: Execution failed: Error Failed to execute sql: java.sql.SQLException: (conn=142) errCode = 2, detailMessage = The materialized view contain constant expr is disallowed, expr: count(0) 查询语句可以正常执行: select user_id, to_date(gdt) as summary_date, count(0) as data_count from kafka_yc_gps_info group by user_id,summary_date order by user_id,summary_date;
1
9921 OP 物化视图限制有点多啊,MergeOnWrite table can't create materialized view
|