[ 
https://issues.apache.org/jira/browse/HBASE-20565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16549135#comment-16549135
 ] 

Zheng Hu commented on HBASE-20565:
----------------------------------

[~yuzhih...@gmail.com], I think you mean 
{code}
filterList = FilterList(MUST_PASS_ALL, ColumnPaginationFilter(5, 1), 
ColumnRangeFilter(1, true, 9, false)) 
{code}
can still return the same result as  
{code}
FilterList(MUST_PASS_ALL, ColumnRangeFilter(1, true, 9, false), 
ColumnPaginationFilter(5, 1))
{code} 

So for the former one,  maintain the count variable in ColumnPaginationFilter 
need to consider the following Filter's return codes... If not INCLUDE*,  then 
the count in ColumnPaginationFilter can not increment (If increment, UT in this 
patch will fail.)... It will make the FilterList code very complicated... I 
don't think it's worth us to implement this... 

On the other hand, the offset in ColumnPaginationFilter is the relative offset  
for emitted cells,  So, from the user's point of view, it's easy to understand 
that ColumnPaginationFilter should be placed after ColumnRangeFilter.  

Thanks. 




> ColumnRangeFilter combined with ColumnPaginationFilter can produce incorrect 
> result since 1.4
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-20565
>                 URL: https://issues.apache.org/jira/browse/HBASE-20565
>             Project: HBase
>          Issue Type: Bug
>          Components: Filters
>    Affects Versions: 2.1.0, 1.4.4, 2.0.0
>            Reporter: Jerry He
>            Assignee: Zheng Hu
>            Priority: Major
>             Fix For: 2.1.0, 1.5.0, 1.4.6, 2.0.2
>
>         Attachments: HBASE-20565.v1.patch, HBASE-20565.v2.patch, debug.diff, 
> debug.log, test-branch-1.4.patch
>
>
> When ColumnPaginationFilter is combined with ColumnRangeFilter, we may see 
> incorrect result.
> Here is a simple example.
> One row with 10 columns c0, c1, c2, .., c9.  I have a ColumnRangeFilter for 
> range c2 to c9.  Then I have a ColumnPaginationFilter with limit 5 and offset 
> 0.  FileterList is FilterList(Operator.MUST_PASS_ALL, ColumnRangeFilter, 
> ColumnPaginationFilter).
> We expect 5 columns being returned.  But in HBase 1.4 and after, 4 columns 
> are returned.
> In 1.2.x, the correct 5 columns are returned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to