Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18424

insert overwrite with union all get incorrect result when execution is tez

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Query Processor
    • Labels:
      None
    • Environment:

      java1.8
      hadoop-2.7.3
      tez-0.8.5
      hive-1.2.1

    • Tags:
      hive,tez

      Description

      when i use hive on tez execute insert overwrite with union all operations,the result i get is different .
      1. mysql is :
      insert overwrite table test.dw_tra_code_map_da_test partition(pt = '20171211000000')
      select
      cast(t1.code as bigint) as code
      ,t1.data_type_code
      ,t1.te_code
      from
      (
      select
      code
      , 1 as data_type_code
      ,te_code as te_code
      from test.ods_fn_info_da
      where pt = '20171211000000'
      group by
      code
      ,te_code
      union all
      select
      code
      ,2 as data_type_code
      ,xte_code_split as te_code
      from test.ods_fn_info_da
      lateral view explode(split(xte_code,'-')) t as xte_code_split
      where pt = '20171211000000'
      )t1
      ;
      select count(1) from test.dw_tra_code_map_da_test where pt= '20171211000000';
      2. different results
      the result of mr is :3517
      the result of tez is :1572 <--wrong result
      3.i check the sql ,before insert overwrite ,the reuslt of mr and tez all 3517,after insert ,get the different result .

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Feng Liu Feng Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: