【详述】
导致be崩溃的sql:
SELECT
*
from (
SELECT
a
, b
, ROW_NUMBER() over(partition by pro.key order by b) as num
from (
SELECT ‘{“aa”:“sss”,“dd”:123}’ as a, 1 as b
union all
SELECT ‘{“aa”:“sss”,“dd”:123}’ as a, 2 as b
) t, LATERAL JSON_EACH(a) as pro
) t
where num = 1
;
只要执行where num=1的时候就会导致be宕机。
如果在外层包一层,则不会报错,不会报错的sql如下:
SELECT
*
from (
select
*
, ROW_NUMBER() over(partition by c order by b) as num
from (
SELECT
a
, b
, pro.key as c
from (
SELECT ‘{“aa”:“sss”,“dd”:123}’ as a, 1 as b
union all
SELECT ‘{“aa”:“sss”,“dd”:123}’ as a, 2 as b
) t, LATERAL JSON_EACH(a) as pro
) t
) t
where num = 1
;
这时候执行where num=1就不会导致be宕机
【背景】无
【业务影响】
【StarRocks版本】2.5.3
【集群规模】3fe+5be
:supervise_thread()