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

stack commented on HBASE-3226:
------------------------------

Sindy, it seems strange that you have to adjust nearly all of these operators.  
Over in TestFromClientSide, there are tests that make use of CompareFilter 
operations and they seem to be doing the right thing.  Or are they?  Would you 
mind checking into these tests?  Maybe they are not written properly or failing 
that, any chance of some code to demonstrate the breakage you are fixing and 
how the above fixes it?

Thanks.

> control condition error in hbase.filter.CompareFilter.doCompare  
> -----------------------------------------------------------------
>
>                 Key: HBASE-3226
>                 URL: https://issues.apache.org/jira/browse/HBASE-3226
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.20.5
>            Reporter: sindy
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> It exists in HBase 0.20.5 , and also exist in TRUNK
> org.apache.hadoop.hbase.filter.CompareFilter.doCompare(CompareOp, 
> WritableByteArrayComparable, byte[], int, int),
>   ---------------------------------------------
>   switch (compareOp) {
>       case LESS:
>         return compareResult <= 0;   
>       case LESS_OR_EQUAL:     
>         return compareResult < 0;
>       case EQUAL:
>         return compareResult != 0;
>       case NOT_EQUAL:
>         return compareResult == 0;
>       case GREATER_OR_EQUAL:
>         return compareResult > 0;
>       case GREATER:
>         return compareResult >= 0;
>       default:
>         throw new RuntimeException("Unknown Compare op " +
>           compareOp.name());
>     }
> -----------------------------------------------------
> !!! modified code:
>     switch (compareOp) {
>       case LESS:
>         return compareResult < 0;
>       case LESS_OR_EQUAL:
>         return compareResult <= 0;
>       case EQUAL:
>         return compareResult == 0;
>       case NOT_EQUAL:
>         return compareResult != 0;
>       case GREATER_OR_EQUAL:
>         return compareResult >= 0;
>       case GREATER:
>         return compareResult >0;
>       default:
>         throw new RuntimeException("Unknown Compare op " +
>           compareOp.name());
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to