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

Vectorization wrong results with filter of (CAST AS CHAR)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: Hive
    • Labels:
      None

      Description

      PROBLEM:
      For query such as
      select count(1) from table where CAST (id as CHAR(4))='1000';
      gives wrong results 0 than expected results.
      STEPS TO REPRODUCE:
      create table s1(id smallint) stored as orc;
      insert into table s1 values (1000),(1001),(1002),(1003),(1000);
      set hive.vectorized.execution.enabled=true;
      select count(1) from s1 where cast(id as char(4))='1000';
      – this gives 0
      set hive.vectorized.execution.enabled=false;
      select count(1) from s1 where cast(id as char(4))='1000';
      – this gives 2

        Attachments

          Activity

            People

            • Assignee:
              mmccline Matt McCline
              Reporter:
              mmccline Matt McCline
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: