Doris使用With语法出现内存占用异常的问题

Viewed 48

Doris版本:2.0.11
使用Doris查询遇到个奇葩问题:
sql语句:

with t1 as (select xxx from xxx),
t2 as (select xxx from xxx),
t3 as (select * from t1 union all select * from t2),
t4 as (select  t3.*,
        row_number()over(partition by  p_id,v_id order by pv_create_date desc)     pid_vid_pv_create_date_rn_desc,
        row_number()over(partition by  p_id,v_id order by pv_create_date asc)      pid_vid_pv_create_date_rn_asc,
        row_number()over(partition by  sn,pv_id  order by un_create_date asc)      pvid_un_create_date_asc,
        row_number()over(partition by  pv_id     order by pv_create_date asc)            pvid_pv_id_asc
from t3),
t5 as (select *,几个count() from t4)
-- select * from t4;
select * from t5;

此时,
如果执行 select * from t5;则能正常查出结果,大概31万条,耗时15s,不会报内存不足;
如果执行 select * from t4;(t5放着不使用),则会报错:

1105 - errCode = 2, detailMessage = (172.16.199.76)[CANCELLED]Process has no memory available, cancel top memory used query: query memory tracker <Query#Id=3c94dfea9df94e40-9eb42bb95ef38428> consumption 4.10 GB, backend 172.16.199.76 process memory used 13.07 GB exceed limit 12.41 GB or sys available memory 1.51 GB less than low water mark 1.55 GB. Execute again after enough memory, details see be.INFO.

如果将t5这条语句注释掉,再执行select * from t4;又能正常查出结果,不会报内存不足。
请问下这是啥情况?是不是Doris的内存管理bug?

1 Answers

能提供下可以复现的ddl吗?这里不方便的话,可以加一下我的微信Faith_xzc

无其他信息更新,暂时先close,有其他问题可以新提一个帖子