V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
9921
V2EX  ›  程序员

Apache Doris 物化视图的问题

  •  
  •   9921 · 194 天前 · 611 次点击
    这是一个创建于 194 天前的主题,其中的信息可能已经有所发展或是发生改变。

    想创建个分组统计数据行数的物化视图 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;

    9921
        1
    9921  
    OP
       194 天前
    物化视图限制有点多啊,MergeOnWrite table can't create materialized view
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5408 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:55 · PVG 16:55 · LAX 01:55 · JFK 04:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.