hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liuhongtao (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-9169) More Comparator
Date Fri, 09 Aug 2013 03:19:47 GMT
liuhongtao created HBASE-9169:
---------------------------------

             Summary: More Comparator
                 Key: HBASE-9169
                 URL: https://issues.apache.org/jira/browse/HBASE-9169
             Project: HBase
          Issue Type: Task
          Components: Filters
    Affects Versions: 0.94.9
            Reporter: liuhongtao


SubstringComparator valueComp1 = new SubstringComparator("C34");
Filter actAttributeValueFilter1 = new SingleColumnValueFilter(Bytes.toBytes("cf"),
				Bytes.toBytes("code"), CompareOp.EQUAL, valueComp1);
SubstringComparator valueComp2 = new SubstringComparator("S72");
Filter actAttributeValueFilter2 = new SingleColumnValueFilter(Bytes.toBytes("cf"),
				Bytes.toBytes("code"), CompareOp.EQUAL, valueComp2);
SubstringComparator valueComp3 = new SubstringComparator("S75");
Filter actAttributeValueFilter3 = new SingleColumnValueFilter(Bytes.toBytes("cf"),
				Bytes.toBytes("code"), CompareOp.EQUAL, valueComp3);

FilterList multiValueFilters = new FilterList();
multiValueFilters.addFilter(actAttributeValueFilter1);
multiValueFilters.addFilter(actAttributeValueFilter2);
multiValueFilters.addFilter(actAttributeValueFilter3);
Filter multiValueORFilter = new FilterList(FilterList.Operator.MUST_PASS_ONE, multiValueFilters);



replace with:

SubstringsOrComparator orValueComp = new SubstringsOrComparator("C34^S72^S75");
Filter orValueFilter = new SingleColumnValueFilter(Bytes.toBytes("cf"),
Bytes.toBytes("code"), CompareOp.EQUAL, orValueComp);


or 

SubstringsAndComparator orValueComp = new SubstringsAndComparator("C34^S72^S75");
Filter orValueFilter = new SingleColumnValueFilter(Bytes.toBytes("cf"),
Bytes.toBytes("code"), CompareOp.NOT_EQUAL, orValueComp);


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message