hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-3226) control condition error in hbase.filter.CompareFilter.doCompare
Date Wed, 16 Jul 2014 23:17:05 GMT

     [ https://issues.apache.org/jira/browse/HBASE-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Purtell resolved HBASE-3226.
-----------------------------------

      Resolution: Invalid
    Release Note:   (was: !!! 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());
    })
    Hadoop Flags:   (was: Reviewed)

> 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: 5m
>  Remaining Estimate: 5m
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message