类型: number_agg 似乎不起作用
尝试使用 number_agg 代替 number 会导致以下问题: dense_rank() 计算: { count: { type: 'count', }, count_rank: { multi_stage: true, type: 'number', sql: 'DENSE_RANK() OVER (ORDER BY `fk_aggregate`.`orders__count` DESC)', }, } 与以下计算相比: measures: { count: { type: 'count', }, count_rank: { multi_stage: true, type: 'number_agg', sql: 'DENSE_RANK() OVER (ORDER BY `count` DESC)', }, } 这会在示例立方体上产生以下错误: cube('Orders', { sql: 'select 1 as id, 100 as amount, "new" status UNION ALL select 2 as id, 200 as amount, "new" status UNION ALL select 3 as id, 300 as amount, "processed" status UNION ALL select 4 as id, 500 as amount, "processed" status UNION ALL select 5 as id, 600 as amount, "shipped" status', measures: { count: { type: 'count', }, count_rank: { multi_stage: true, type: 'number_agg', sql: 'DENSE_RANK() OVER (ORDER BY `count` DESC)', }, totalAmount: { sql: 'amount', type: 'sum', }, toRemove: { type: 'count', }, }, dimensions: { status: { sql: 'status', type: 'string', }, }, }, ) 在我的 PostgreSQL (StarRocks) 上会产生以下错误: ER_PARSE_ERROR: Getting analyzing error from line 51, column 385 to line 51, column 495. Detail message: No matching function with signature: numberagg(bigint(20)).
内容来源: cube-js/cube