查询视图时报错 [INTERNAL_ERROR]VSlotRef env_code have invalid slot id

Viewed 7

查询视图时偶尔会产生报错
视图的定义大致为:create view test1 as select * from a union all select * from b
查询视图的语句是:select * from test1 where env_code=2003
单独查询a表是没有对应数据的,单独查询b表是有数据的。
查询视图就会报错:[INTERNAL_ERROR]VSlotRef env_code have invalid slot id: 342, desc: tuple_desc_map: [Tuple(id=0 slots=[Slot(id=0 type=BIGINT col=-1, colname=env_code, nullable=0), Slot(id=340 type=TINYINT col=-1, colname=DORIS_DELETE_SIGN, nullable=0)] has_varlen_slots=0)] tuple_id_map: [0] tuple_is_nullable: [0] , slot_desc: Slot(id=342 type=BIGINT col=-1, colname=env_code, nullable=0), desc_tbl: tuples:
请教一下该怎么解决?

1 Answers

2.1.10版本通过设置set enable_nereids_planner =false来解决,是由于新老优化器兼容问题导致的