Search before asking
Version
create table tmps.tmp_trace_link_long_magnetic_sort PROPERTIES ( "replication_num" = "2" ) as with recursive t(id, a) as ( select cast(1 as bigint), array(cast(1 as bigint))
union all
select
id + 1,
array_pushback(a, id)
from t
where id < 5
) select * from t;
What's Wrong?
SQL 错误 [1105] [HY000]: fragment has no children
What You Expected?
-- 1. 显式建表(明确指定字段类型)
drop table tmps.tmp_trace_link_long_magnetic_sort;
CREATE TABLE tmps.tmp_trace_link_long_magnetic_sort (
id BIGINT,
a ARRAY
)
PROPERTIES (
"replication_num" = "2"
);
-- 方法 1:直接关闭 Nereids 优化器(推荐)
SET enable_nereids_planner = false;
-- 方法 2:如果方法 1 报错,尝试开启自动回退机制
SET enable_fallback_to_original_planner = true;
-- 2. 插入数据
INSERT INTO tmps.tmp_trace_link_long_magnetic_sort
WITH RECURSIVE t(id, a) AS (
SELECT
CAST(1 AS BIGINT),
array(CAST(1 AS BIGINT))
UNION ALL
SELECT
id + 1,
array_pushback(a, id)
FROM t
WHERE id < 5
)
SELECT * FROM t;
SQL 错误 [1105] [HY000]: fragment has no children
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
Search before asking
Version
create table tmps.tmp_trace_link_long_magnetic_sort PROPERTIES ( "replication_num" = "2" ) as with recursive t(id, a) as ( select cast(1 as bigint), array(cast(1 as bigint))
union all
select
id + 1,
array_pushback(a, id)
from t
where id < 5
) select * from t;
What's Wrong?
SQL 错误 [1105] [HY000]: fragment has no children
What You Expected?
-- 1. 显式建表(明确指定字段类型)
drop table tmps.tmp_trace_link_long_magnetic_sort;
CREATE TABLE tmps.tmp_trace_link_long_magnetic_sort (
id BIGINT,
a ARRAY
)
PROPERTIES (
"replication_num" = "2"
);
-- 方法 1:直接关闭 Nereids 优化器(推荐)
SET enable_nereids_planner = false;
-- 方法 2:如果方法 1 报错,尝试开启自动回退机制
SET enable_fallback_to_original_planner = true;
-- 2. 插入数据
INSERT INTO tmps.tmp_trace_link_long_magnetic_sort
WITH RECURSIVE t(id, a) AS (
SELECT
CAST(1 AS BIGINT),
array(CAST(1 AS BIGINT))
UNION ALL
SELECT
id + 1,
array_pushback(a, id)
FROM t
WHERE id < 5
)
SELECT * FROM t;
SQL 错误 [1105] [HY000]: fragment has no children
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct