You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/03/01 01:09:46 UTC

[GitHub] [incubator-doris] longfengpili opened a new issue #8272: failed to get tuple idx when prepare with tuple id: 6, slot id: 20

longfengpili opened a new issue #8272:
URL: https://github.com/apache/incubator-doris/issues/8272


   ### Discussed in https://github.com/apache/incubator-doris/discussions/8270
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **longfengpili** February 28, 2022</sup>
   SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = failed to get tuple idx when prepare with tuple id: 6, slot id: 20
   
   ```sql
   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 fact_10001123_15.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_id|gsrv_id|iap|
   |--|--|--|
   |708542885217499579|20007|0.99|
   |708542885217499579|20008|null|
   |708542885217499579|20009|null|
   
   这个报错是什么意思呢?</div>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] longfengpili commented on issue #8272: failed to get tuple idx when prepare with tuple id: 6, slot id: 20

Posted by GitBox <gi...@apache.org>.
longfengpili commented on issue #8272:
URL: https://github.com/apache/incubator-doris/issues/8272#issuecomment-1054873530


   如果修改为sum就可以


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org