incubator-doris failed to get tuple idx when prepare with tuple id: 6, slot id: 20

olhwl3o2  于 2022-04-22  发布在  Java
关注(0)|答案(1)|浏览(268)

Discussed in #8270

Originally posted bylongfengpiliFebruary 28, 2022
SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = failed to get tuple idx when prepare with tuple id: 6, slot id: 20

drop table if exists test.new_user1;

create table if not exists test.new_user1(
  role_id varchar(255),
  gsrv_id varchar(255),
  iap float,
  INDEX uid (role_id) USING BITMAP COMMENT 'uid索引'
) ENGINE=OLAP
DUPLICATE KEY(role_id, gsrv_id)
COMMENT "OLAP"
DISTRIBUTED BY HASH(role_id) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);

truncate table test.new_user1;

insert into test.new_user1
(role_id, gsrv_id, iap
  )

with raw_t as (
select date, role_id, gsrv_id, 
row_number()over(partition by role_id, gsrv_id order by date asc) as rn
from test.user_daily
where role_id = '708542885217499579'
),

first_t as ( 
select role_id, date as reg_day, gsrv_id
from raw_t  
where rn=1
),

iap_temp as (   
select row_number()over(partition by role_id, gsrv_id order by time asc) as rn,
time, role_id, gsrv_id,  
round(currency_amount/currency_rate/100,2) as iap
-- sum(round(currency_amount/(currency_rate*100),2)) as iap
from test.pcenter_role_credit as a 
left join test.currency_type as b  
on a.currency_type=b.currency_id   
where time>="2022-01-13 00:00:00"
-- group by 1, 2, 3
),

iap_t_1 as ( 
select * 
from iap_temp 
where rn=1
),

tx as (
select  
a.role_id, a.gsrv_id, b.iap
from first_t as a
left join iap_t_1 b
on a.role_id = b.role_id and a.gsrv_id = b.gsrv_id
)

select role_id, gsrv_id, iap
from tx
;

insert 下面语句能正常返回,返回内容:

role_idgsrv_idiap
708542885217499579200070.99
70854288521749957920008null
70854288521749957920009null

这个报错是什么意思呢?

相关问题