Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20151

Bug with SingleColumnValueFilter and FamilyFilter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • 2.1.0, 2.0.1, 1.4.5
    • None
    • None
    • None
    • MacOS 10.13.3

      HBase 1.3.1

    Description

      When running the following queries, the result is sometimes return correctly and other times incorrectly based on the qualifier queried.

      Setup:

      create 'test', 'a', 'b'
      test = get_table 'test'
      
      test.put '1', 'a:1', nil
      test.put '1', 'a:10', nil
      test.put '1', 'b:2', nil
      

       
      This query works fine when the SCVF's qualifier has length 1 (i.e. '1') :

      test.scan({ FILTER => "( SingleColumnValueFilter('a','1',=,'binary:',true,true) AND FamilyFilter(=,'binary:b') )"})
      ROW                                       COLUMN+CELL
       1                                        column=b:2, timestamp=1520455888059, value=
      1 row(s) in 0.0060 seconds
      

       

      The query should return the same result when passed a qualifier of length 2 (i.e. '10') :

      test.scan({ FILTER => "( SingleColumnValueFilter('a','10',=,'binary:',true,true) AND FamilyFilter(=,'binary:b') )"})
      ROW                                       COLUMN+CELL
      0 row(s) in 0.0110 seconds
      

      However, in this case, it does not return any row (expected result would be to return the same result as the first query).

       

      Removing the family filter while the qualifier is '10' yields expected results:

      test.scan({ FILTER => "( SingleColumnValueFilter('a','10',=,'binary:',true,true) )"})
      ROW                                       COLUMN+CELL
       1                                        column=a:1, timestamp=1520455887954, value=
       1                                        column=a:10, timestamp=1520455888024, value=
       1                                        column=b:2, timestamp=1520455888059, value=
      1 row(s) in 0.0140 seconds
      

       

       

      Attachments

        1. filter-list-type.v1.txt
          6 kB
          Ted Yu
        2. HBASE-20151.master.001.patch
          1 kB
          Reid Chan
        3. HBASE-20151.master.002.patch
          7 kB
          Reid Chan
        4. HBASE-20151.master.003.patch
          10 kB
          Reid Chan
        5. HBASE-20151.master.004.patch
          15 kB
          Michael Stack
        6. HBASE-20151.master.004.patch
          15 kB
          Reid Chan
        7. HBASE-20151.master.005.patch
          14 kB
          Reid Chan
        8. HBASE-20151.master.006.patch
          9 kB
          Reid Chan

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ssadowski Steven Sadowski
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: