类型: number_agg 无法通过方案验证,除非设置了 multi_stage: true,但衡量指标列表将其标记为普通衡量指标类型
作者: ZmeiGorynych创建于 2026年9月28日更新于 2026年9月28日
描述错误
在 type 表中,措施引用了 number_agg 并将其称为"自定义聚合函数 | 自定义聚合函数不受其他类型(例如 PERCENTILE_CONT)的限制。仅限 Tesseract。" 无论是表还是下面的 警告都没有提到需要 multi_stage: true。具有 type: number_agg 但没有 multi_stage 的措施在 Tesseract 启用或禁用时都无法编译,错误中没有提及 multi_stage:
orders cube: "measures.max_amount_agg.type" must be one of [count, number, string, boolean, time, sum, avg, min, max, countDistinct, countDistinctApprox]. "measures.max_amount_agg.sql" is not allowedCubeValidator 只接受 multiStageMeasureType中的 numberAgg。 MeasuresSchema 的非多阶段分支使用 measureType,其中不包含它。然而, Tesseract 将 number_agg 视为普通的聚合措施类型(measure_kinds/mod.rs, 在 L209 处进行了渲染传递)。其测试固定文件 measure_kind_tests.yaml 将 type: numberAgg, sql: amount 设置为 multi_stage 为 false。
内容来源: cube-js/cube