• 请不要在回答技术问题时复制粘贴 AI 生成的内容
9921
V2EX  ›  程序员

Apache Doris 物化视图的问题

  •  
  •   9921 · Oct 12, 2023 · 1980 views
    This topic created in 945 days ago, the information mentioned may be changed or developed.

    想创建个分组统计数据行数的物化视图 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
       Oct 12, 2023
    物化视图限制有点多啊,MergeOnWrite table can't create materialized view
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5537 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 104ms · UTC 08:23 · PVG 16:23 · LAX 01:23 · JFK 04:23
    ♥ Do have faith in what you're doing.