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

Incorrect results for IN UDF on Parquet column of CHAR/VARCHAR type

    XMLWordPrintableJSON

Details

    Description

      Query involving case statement with two or more conditions leads to incorrect result for tables with parquet format, The problem is not observed with ORC or TextFile.

      Steps to reproduce:

      create external table case_test_parquet(kob varchar(2),enhanced_type_code int) stored as parquet;
      insert into case_test_parquet values('BB',18),('BC',18),('AB',18);
      
      select case when (
                         (kob='BB' and enhanced_type_code='18')
                         or (kob='BC' and enhanced_type_code='18')
                       )
                  then 1
                  else 0
              end as logic_check
      from case_test_parquet;
      

      Result:

      0
      0
      0
      

      Expected result:

      1
      1
      0
      

      The problem does not appear when setting hive.optimize.point.lookup=false.

      Attachments

        Activity

          People

            jfs John Sherman
            chiran54321 Chiran Ravani
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h
                5h