[
https://issues.apache.org/jira/browse/HBASE-20151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391662#comment-16391662
]
Anoop Sam John commented on HBASE-20151:
----------------------------------------
All these are bugs with FilterList.. Many such were addressed by HBASE-18410.
Can you check the same test case with 2.0.0-alpha-4 or above pls?
bq.The query should return the same result when passed a qualifier of length 2
(i.e. '10') :
The issue is not the Q length. If the SCVF is on a Q with length 1 only but
that is not the first Q in that CF (Like u have a:1 and a:2 and SCVF on a:2),
then also same issue would happen. This is because in Family Filter we have
if (compareFamily(getCompareOperator(), this.comparator, c)) {
return ReturnCode.NEXT_ROW;
}
}
return ReturnCode.INCLUDE;
FL contains this Filter and SCVF. When the condition is on 1st Q in CF 'a',
the SCVF filterCell says INCLUDE and FamilyFilter say NEXT_ROW. So this Cell
is not included but the SCVF marked this row as success. When processing cells
from next CF ie. b, the SCVF still says include as the row is passed and Family
filter also say same. So we get the ans.
Where as the SCVF is on 2nd Q, the SCVF#filterCell did not get a chance to mark
this row as passed. It returns INCLUDE only and the Family filter says NEXT_ROW
and alas the FL says some how NEXT_ROW only. So the SCVF will not see the 2nd
Cell in CF 'a'.
> Bug with SingleColumnValueFilter and FamilyFilter
> -------------------------------------------------
>
> Key: HBASE-20151
> URL: https://issues.apache.org/jira/browse/HBASE-20151
> Project: HBase
> Issue Type: Bug
> Environment: MacOS 10.13.3
> HBase 1.3.1
> Reporter: Steven Sadowski
> Priority: Major
>
> When running the following queries, the result is sometimes return correctly
> and other times incorrectly based on the qualifier queried.
> Setup:
> {code:java}
> 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
> {code}
>
> This query works fine when the SCVF's qualifier has length 1 (i.e. '1') :
> {code:java}
> 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
> {code}
>
> The query should return the same result when passed a qualifier of length 2
> (i.e. '10') :
> {code:java}
> test.scan({ FILTER => "(
> SingleColumnValueFilter('a','10',=,'binary:',true,true) AND
> FamilyFilter(=,'binary:b') )"})
> ROW COLUMN+CELL
> 0 row(s) in 0.0110 seconds
> {code}
> 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:
> {code:java}
> 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
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)