doris union all 执行插入报错sync filter size meet error, filter: RuntimeFilter:

Viewed 22

doris版本2.1.4
执行sql:
insert into enterprise_atlas.ft_colleges_and_sri(unit_id,unit_class_code,U1310000,U1310100,U1310110,U1310111
, U9310001, U9310002, U9311001, U9311002, U9311003, U9311004,is_deleted,process_update_time)
select unit_id,unit_class_code
,sum(nvl(U1310000,0)) U1310000
,sum(nvl(U1310100,0)) U1310100
,sum(nvl(U1310110,0)) U1310110
,sum(nvl(U1310111,0)) U1310111
,sum(nvl(U9310001,0)) U9310001
,sum(nvl(U9310002,0)) U9310002
,sum(nvl(U9311001,0)) U9311001
,sum(nvl(U9311002,0)) U9311002
,sum(nvl(U9311003,0)) U9311003
,sum(nvl(U9311004,0)) U9311004
, 2
, now()
from (
select y.patentee_id unit_id, y.patentee_type unit_class_code
,count(1) U1310000
,sum(case when status_code in (10,30) then 1 else 0 end) U1310100
,sum(case when status_code in (10,30) and patent_type_code = 1 then 1 else 0 end) U1310110
,0 U1310111
,0 U9310001,0 U9310002,0 U9311001,0 U9311002,0 U9311003,0 U9311004
from
enterprise_atlas.lt_patent_valid_rights_year y
,ipo_dw.lt_bo_ipo_patent p
where y.period = 2024
and y.apply_num = p.apply_num
and y.patentee_type in ('UC','SRI')
GROUP BY y.patentee_id, y.patentee_type
union all
select y.patentee_id unit_id, y.patentee_type unit_class_code
,0 U1310000
,0 U1310100
,0 U1310110
,sum(case when status_code in (10,30) then 1 else 0 end) U1310111
,0 U9310001,0 U9310002,0 U9311001,0 U9311002,0 U9311003,0 U9311004
from
enterprise_atlas.lt_patent_valid_rights_year y
,ipo_dw.lt_bo_ipo_patent_high_value p
where y.period = 2024
and y.apply_num = p.apply_num
and y.patentee_type in ('UC','SRI')
GROUP BY y.patentee_id, y.patentee_type
union all
select t.patentee_id unit_id,t.patentee_type unit_class_code
,0 U1310000,0 U1310100,0 U1310110,0 U1310111
,0 U9310001
,count(distinct kk.patentee_id) U9310002
,count(distinct kk.apply_num) U9311001,0 U9311002,0 U9311003,0 U9311004
from ipo_dw.rt_patent_valid_rights_only_patentee t
,ipo_dw.rt_patent_valid_rights_only_patentee kk
where t.patentee_type in ('UC','SRI')
and kk.apply_num = t.apply_num
and kk.patentee_type = 'IME'
and t.is_deleted = 2
group by t.patentee_id,t.patentee_type
union all
/专利转让量/
select before_patentee_id unit_id, before_patentee_type unit_class_code
,0 U1310000,0 U1310100,0 U1310110,0 U1310111
,0 U9310001,0 U9310002,count(1) U9311001,0 U9311002,0 U9311003,0 U9311004
from ipo_dw.rt_patent_transfer_before t
where t.before_patentee_type in ('UC','SRI')
and t.is_deleted = 2
GROUP BY before_patentee_id, before_patentee_type
union all
select assignor_id unit_id,assignor_type unit_class_code
,0 U1310000,0 U1310100,0 U1310110,0 U1310111
,0 U9310001,0 U9310002,0 U9311001,count(1) U9311002,0 U9311003,0 U9311004
from ipo_dw.rt_patent_permission_assignor t
where t.assignor_type in ('UC','SRI')
and t.is_deleted = 2
GROUP BY assignor_id,assignor_type
union all
select y.patentee_id unit_id,y.patentee_type unit_class_code
,0 U1310000,0 U1310100,0 U1310110,0 U1310111
,0 U9310001,0 U9310002,0 U9311001,0 U9311002,count(distinct y.apply_num) U9311003,0 U9311004
from
enterprise_atlas.lt_patent_valid_rights_year y
,ipo_dw.rt_patent_original_apply_person p
where y.period = 2024
and y.apply_num = p.apply_num
and y.patentee_id = p.apply_person_id
and y.patentee_type in ('UC','SRI')
GROUP BY y.patentee_id, y.patentee_type
union all
select p.apply_person_id unit_id,p.apply_person_type unit_class_code
,0 U1310000,0 U1310100,0 U1310110,0 U1310111
,0 U9310001,0 U9310002,0 U9311001,0 U9311002,0 U9311003,count(distinct y.inventor_name) U9311004
from
ipo_dw.rt_patent_original_apply_person p
,ipo_dw.rt_patent_inventor y
where y.apply_num = p.apply_num
and p.apply_person_type in ('UC','SRI')
GROUP BY p.apply_person_id, p.apply_person_type
) k group by unit_id,unit_class_code

报错信息
org.jkiss.dbeaver.model.sql.DBSQLException: SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = (10.26.39.18)[INTERNAL_ERROR]sync filter size meet error, filter: RuntimeFilter: (id = 0, type = in_or_bloomfilter, need_local_merge: false, is_broadcast: false, build_bf_cardinality: true
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:614)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$2(SQLQueryJob.java:505)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:527)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:976)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:4133)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:123)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:190)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:121)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5148)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:114)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: errCode = 2, detailMessage = (10.26.39.18)[INTERNAL_ERROR]sync filter size meet error, filter: RuntimeFilter: (id = 0, type = in_or_bloomfilter, need_local_merge: false, is_broadcast: false, build_bf_cardinality: true
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2483)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2441)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:330)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 11 more

2 Answers

建表语句CREATE TABLE ft_colleges_and_sri_test (
unit_id VARCHAR(500) NULL COMMENT '单位编号',
unit_class_code VARCHAR(100) NULL,
U1310000 INT NULL DEFAULT "0" COMMENT '专利量',
U1310100 INT NULL DEFAULT "0" COMMENT '有效专利量',
U1310110 INT NULL DEFAULT "0" COMMENT '有效发明专利量',
U1310111 INT NULL DEFAULT "0" COMMENT '高价值发明专利量',
U9310001 INT NULL DEFAULT "0" COMMENT '合作企业量',
U9310002 INT NULL DEFAULT "0" COMMENT '合作申请专利量',
U9311001 INT NULL DEFAULT "0" COMMENT '专利转让量',
U9311002 INT NULL DEFAULT "0" COMMENT '专利许可量',
U9311003 INT NULL DEFAULT "0" COMMENT '自持专利量',
U9311004 INT NULL DEFAULT "0" COMMENT '发明(设计)人数',
is_deleted INT NULL DEFAULT "2" COMMENT '是否删除',
process_update_time DATETIME(3) NULL COMMENT '更新日期'
) ENGINE=OLAP
UNIQUE KEY(unit_id)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(unit_id) BUCKETS 3
PROPERTIES (
"replication_allocation" = "tag.location.default: 3"
);

image.png

select查询没啥问题,插入就报错
image.png