[ 
https://issues.apache.org/jira/browse/HIVE-19398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liaozhenjiang updated HIVE-19398:
---------------------------------
    Description: 
the script is as follows.

their are 120 "select xx from xx union all.. ".

But it sometimes fail to insert data into partition of table ,with none 
exception or failure information。

what's the problem? how to avoid the problem?
||code||
|set hive.exec.parallel=true;
 set hive.exec.parallel.thread.number=50;
 insert into mart.yy_indicate_mon PARTITION (pt_dt = '${hiveconf:tx_date}') 
 select 'BLL-YQQS','business_overtime_count',count(1),'yqqs' ,'xxx' from 
sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and pt_dt 
= 'xxx'
 union all
 SELECT 'BLL-GJBLLQSB','business_overtime_count_per',OVERDUE_NUM/ALL_NUM 
,'yqqsb' ,'xxx2' from (SELECT COUNT(1) OVERDUE_NUM FROM 
sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and pt_dt 
= '${hiveconf:tx_date}') a,(SELECT COUNT(1) ALL_NUM FROM 
sda.loancore_asset_repay_plan WHERE REPAY_PLAN_STATUS in('1','4','5') and pt_dt 
= 'xxx') b 
 union all
 。。。|

  was:
the script is as follows.

their 120 "select xx from xx union all.. ".

But it sometimes fail to insert data into partition of table ,

what's the problem? how to avoid the problem?
||code||
|set hive.exec.parallel=true;
 set hive.exec.parallel.thread.number=50;
insert into mart.yy_indicate_mon PARTITION (pt_dt = '${hiveconf:tx_date}') 
 select 'BLL-YQQS','business_overtime_count',count(1),'yqqs' ,'xxx' from 
sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and pt_dt 
= 'xxx'
 union all
 SELECT 'BLL-GJBLLQSB','business_overtime_count_per',OVERDUE_NUM/ALL_NUM 
,'yqqsb' ,'xxx2' from (SELECT COUNT(1) OVERDUE_NUM FROM 
sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and pt_dt 
= '${hiveconf:tx_date}') a,(SELECT COUNT(1) ALL_NUM FROM 
sda.loancore_asset_repay_plan WHERE REPAY_PLAN_STATUS in('1','4','5') and pt_dt 
= 'xxx') b 
 union all
。。。|


> hive overwrite table1 fail insert 
> ----------------------------------
>
>                 Key: HIVE-19398
>                 URL: https://issues.apache.org/jira/browse/HIVE-19398
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.1.0
>            Reporter: liaozhenjiang
>            Priority: Major
>             Fix For: 1.1.0
>
>
> the script is as follows.
> their are 120 "select xx from xx union all.. ".
> But it sometimes fail to insert data into partition of table ,with none 
> exception or failure information。
> what's the problem? how to avoid the problem?
> ||code||
> |set hive.exec.parallel=true;
>  set hive.exec.parallel.thread.number=50;
>  insert into mart.yy_indicate_mon PARTITION (pt_dt = '${hiveconf:tx_date}') 
>  select 'BLL-YQQS','business_overtime_count',count(1),'yqqs' ,'xxx' from 
> sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and 
> pt_dt = 'xxx'
>  union all
>  SELECT 'BLL-GJBLLQSB','business_overtime_count_per',OVERDUE_NUM/ALL_NUM 
> ,'yqqsb' ,'xxx2' from (SELECT COUNT(1) OVERDUE_NUM FROM 
> sda.loancore_asset_repay_plan t where t.REPAY_PLAN_STATUS in('4','5') and 
> pt_dt = '${hiveconf:tx_date}') a,(SELECT COUNT(1) ALL_NUM FROM 
> sda.loancore_asset_repay_plan WHERE REPAY_PLAN_STATUS in('1','4','5') and 
> pt_dt = 'xxx') b 
>  union all
>  。。。|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to