Hey hbasers,

I'm working on pushing predicates down from Hive, and starting with a very 
basic case (equality on a simple key).  This ends up looking like a get, but 
for now it still uses TableInputFormatBase since later we'll be extending it to 
range scans as well.

After converting the key to byte [] startRow, I do the following, since stopRow 
is exclusive rather than inclusive:

    byte [] stopRow = new byte[startRow.length + 1];
    System.arraycopy(startRow, 0, stopRow, 0, startRow.length);
    scan.setStartRow(startRow);
    scan.setStopRow(stopRow);

I just wanted to confirm

(a) Is this the correct way to create a stopRow for a point lookup (appending a 
single zero byte to make the successor lexical value)?

(b) Do I also need a WhileMatchFilter, or is setStartRow+setStopRow guaranteed 
to do all the filtering directly?

Thanks,
JVS

Reply via email to