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

Case When Some result data is lost when there are common column conditions and partitioned column conditions

    XMLWordPrintableJSON

Details

    Description

      https://issues.apache.org/jira/browse/HIVE-26505#
      create table test0831 (id string) partitioned by (cp string);
      insert into test0831 values ('a', '2022-08-23'),('c', '2022-08-23'),('d', '2022-08-23');
      insert into test0831 values ('a', '2022-08-24'),('b', '2022-08-24');
      select * from test0831;
      +-------------+--------------+
      | test0831.id | test0831.cp  |
      +-------------+--------------+
      | a         | 2022-08-23   |
      | b        | 2022-08-23   |
      | a        | 2022-08-23   |
      | c        | 2022-08-24   |
      | d        | 2022-08-24   |
      +-------------+--------------+
      
      select * from test0831 where (case when id='a' and cp='2022-08-23' then 1 else 0 end)=0;  
      +--------------+--------------+
      | test0830.id  | test0830.cp  |
      +--------------+--------------+
      | a        | 2022-08-24   |
      | b        | 2022-08-24   |
      +--------------+--------------+
      

       

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              luguangming GuangMing Lu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: