麻烦排查以下2个问题
【详述】存算分离版本, count(1) over(partition by )不加order by的时候查询
报错1:执行以下sql报错:
select distinct #distinct_id
from (select *,count(1)over(partition by #distinct_id
) as cnt from dwd_fact_event_0preset_register_20 where #days
= ‘2023-11-09’) t where cnt > 1 limit 10;
排查发现:只要开窗的时候加order by 就可以执行,不加就报错。
报错2:count(1) 替换成 count(decimal类型字段)也会报错,报错为不支持decimal类型
执行sql:
select distinct #distinct_id
from (select *,count(pay_money)over(partition by #distinct_id
) as cnt from dwd_fact_event_0preset_paid_17 where #days
= ‘2023-11-09’) t where cnt > 1 limit 10;
【业务影响】
【StarRocks版本】sr的版本是 branch-3.1-de6c740
【集群规模】3fe + 10be 存算分离版本