运行配置单元代码时出现错误“indexoutofboundsexception index:3,size:3”

lf5gs5x2  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(215)

我每天运行下面的代码,每次都成功。但当我今天运行它时,出现了一个错误indexoutofboundsexception index:3,size:3。当我删除这个条款时” where member_srl is not null “,它成功了。所以我不知道我的代码有什么问题。为什么它今天不能运行。谢谢。

select   member_srl, dt, sessionid  , (max(reg_time)-min(reg_time)) as duration, count(reg_time) as click_cnt 
      from
       (
         select cast(member_srl as bigint) as member_srl, reg_date as dt, sessionid, cast(SUBSTRING(reg_time,1,2)*3600+SUBSTRING(reg_time,3,2)*60+SUBSTRING(reg_time,5,2) as bigint) as reg_time
         from default.daily_session 
         where member_srl<>'' and dt = '20161009'
        union all
        select cast(member_srl as bigint) as member_srl, reg_date as dt, sessionid, cast(SUBSTRING(reg_time,1,2)*3600+SUBSTRING(reg_time,3,2)*60+SUBSTRING(reg_time,5,2) as bigint) as reg_time
         from default.daily_session_mobile  
         where member_srl<>'' and dt = '20161009'
        union all 
        select cast(member_srl as bigint) as member_srl, reg_date as dt, sessionid, cast(SUBSTRING(reg_time,1,2)*3600+SUBSTRING(reg_time,3,2)*60+SUBSTRING(reg_time,5,2) as bigint) as reg_time
         from default.daily_session_ios  
         where member_srl<>'' and dt = '20161009'
       ) base  where member_srl is not null 
       group by member_srl, dt, sessionid

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题