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

OR Condition on binary column is returning empty result

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Repro steps

      create table test_binary(data_col timestamp, binary_col binary) partitioned by (ts string);
      insert into test_binary partition(ts='202204200000') values ('2022-04-20 00:00:00.0', 'a'),('2022-04-20 00:00:00.0', 'b'), ('2022-04-20 00:00:00.0', 'c');
      // Works
      select * from test_binary where ts='202204200000' and binary_col = unhex('61');
      select * from test_binary where ts='202204200000' and binary_col between unhex('61') and unhex('62');
      //Returns empty result
      select * from test_binary where binary_col = unhex('61') or binary_col = unhex('62');
      select * from test_binary where ts='202204200000' and (binary_col = unhex('61') or binary_col = unhex('62'));
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            pvary Peter Vary Assign to me
            nareshpr Naresh P R
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 40m
              40m

              Slack

                Issue deployment