hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Hu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19640) Change in filterAllRemaining() impl for FilterListWithOR
Date Thu, 28 Dec 2017 02:55:00 GMT

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

Zheng Hu commented on HBASE-19640:
----------------------------------

bq. BTW do Phoenix used this old behave? 
[~ankit@apache.org] FYI 

Close this issue. 




> Change in filterAllRemaining() impl for FilterListWithOR
> --------------------------------------------------------
>
>                 Key: HBASE-19640
>                 URL: https://issues.apache.org/jira/browse/HBASE-19640
>             Project: HBase
>          Issue Type: Bug
>          Components: Filters
>    Affects Versions: 2.0.0-beta-1
>            Reporter: Ankit Singhal
>            Assignee: Zheng Hu
>
> filterAllRemaining() in FilterListWithOR will now return false if the filter list is
empty whereas earlier it used to return true for Operator.MUST_PASS_ONE.
> *In HBase-2.0*
> {code}
>  @Override
>   public boolean filterAllRemaining() throws IOException {
>     if (isEmpty()) {
>       return super.filterAllRemaining();//false
>     }
>     for (int i = 0, n = filters.size(); i < n; i++) {
>       if (!filters.get(i).filterAllRemaining()) {
>         return false;
>       }
>     }
>     return true;
>   }
> {code}
> Earlier versions(1.3.1 atleast):-
> {code}
> @Override
>   public boolean filterAllRemaining() throws IOException {
>     int listize = filters.size();
>     for (int i = 0; i < listize; i++) {
>       if (filters.get(i).filterAllRemaining()) {
>         if (operator == Operator.MUST_PASS_ALL) {
>           return true;
>         }
>       } else {
>         if (operator == Operator.MUST_PASS_ONE) {
>           return false;
>         }
>       }
>     }
>     return operator == Operator.MUST_PASS_ONE;
>   }
> {code}
> IMO, the current implementation seems to be right, but probably this change requires
a release note at least as some people might have implemented the filters considering the
old semantics.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message