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

Vectorization: Wrong Results issues in IF expressions about Two-level nested UDF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0, 4.0.0
    • None
    • Vectorization
    • None
    • Important

    Description

      After set hive.vectorized.execution.enabled = true, if there are two levels nested UDF conversion fields in the IF expression, the result will be incorrect.

      Test case:
      create table if_orc (col string, col2 string) stored as orc;
      insert into table if_orc values('1', 'abc'),('1', 'abc'),('2', 'def'),( '2', 'def');
      set hive.vectorized.execution.enabled = true;
      select if(col='2', col2, reverse(upper(col2))) from if_orc;

      set hive.vectorized.execution.enabled = false;
      Right Result:
      ------

      _c0

      ------

      CBA
      CBA
      def
      def

      ------

      set hive.vectorized.execution.enabled = true;
      Wrong result:
      ------

      _c0

      ------

      CBA
      CBA
      ABC
      ABC

      ------

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: