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

using coalesce via vector,when date type of column are different between source and target,the result of target is zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • Vectorization
    • None

    Description

      set hive.vectorized.execution.enabled=true;

       

      CREATE TABLE `tmp.tmp_test_vectorization_source`(
      `rn` string,
      `val_1` int,
      `val_2` bigint)
      stored as parquet;

       

      insert into table `tmp.tmp_test_vectorization_source` values('line1',1000,10001),('line1',2000,20001);

       

      select rn,val_1,val_2 from tmp.tmp_test_vectorization_source t;

       

      -------------++-------

      rn val_1 val_2

      -------------++-------

      line1 1000 10001
      line1 2000 20001

      -------------++-------

       

      CREATE TABLE `tmp.tmp_test_vectorization_target`(
      `rn` string,
      `val_1` bigint,
      `val_2` int)
      stored as parquet;

       

      insert into table tmp.tmp_test_vectorization_target
      select
      rn,
      coalesce(val_1,0),
      coalesce(val_2,0)
      from tmp.tmp_test_vectorization_source;

       

      select rn,val_1,val_2 from tmp.tmp_test_vectorization_target t;

       

      -------------++-------

      rn val_1 val_2

      -------------++-------

      line1 0 0
      line1 0 0

      -------------++-------

      Attachments

        Activity

          People

            Unassigned Unassigned
            taoyuyin taoyuyin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: