Hi,
    I'm trying to use some filters and the results are not like expected.
Maybe there it's a bug. I'm using HBase 0.20.0 RC3
    I'm trying to filter rows using SingleColumnValueFilter like this:
        Scan s = new Scan();

        Filter filter1 = new SingleColumnValueFilter(Bytes.toBytes("F1"),
Bytes.toBytes("c1"), CompareOp.EQUAL, Bytes.toBytes("1"));
        Filter filter2 = new SingleColumnValueFilter(Bytes.toBytes("F1"),
Bytes.toBytes("c2"), CompareOp.EQUAL, Bytes.toBytes("1"));
        List<Filter> rowFilters = new ArrayList<Filter>();
        rowFilters.add(filter1);rowFilters.add(filter2);
        Filter filter = new FilterList(FilterList.Operator.MUST_PASS_ONE,
rowFilters);

        s.addColumn(Bytes.toBytes("F1"), Bytes.toBytes("c1"));
        s.addColumn(Bytes.toBytes("F1"), Bytes.toBytes("c2"));
        s.setFilter(filter);

        long startTime = System.currentTimeMillis();
        ResultScanner scanner = table.getScanner(s);

This filter returns all rows the contains F1:c1 whit val "1" or contains
F1:c2 whit val "1" or contains both.
If I replace "addColumn" methods whit s.addFamily("F1"); the scanner returns
all rows from the table whit no filtering eaven if the F1:c1/c2 columns
doesn't exist

How can I get only the rows that matches all the conditions?

Thank you,
   Olariu Adrian.

Reply via email to