bsglz commented on a change in pull request #767:
URL: https://github.com/apache/hbase/pull/767#discussion_r415293749
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
##########
@@ -1022,4 +1026,31 @@ public void
testPreadNotEnabledForCompactionStoreScanners() throws Exception {
assertFalse(storeScanner.isScanUsePread());
}
}
+
+ @Test
+ public void testReadVersionWithRawAndFilter() throws IOException {
+ ScanInfo scanInfo = new ScanInfo(CONF, CF, 0, 1, Long.MAX_VALUE,
+ KeepDeletedCells.FALSE, HConstants.DEFAULT_BLOCKSIZE, 0
+ , CellComparator.getInstance(), false);
+ KeyValue [] kvs = new KeyValue[] {
+ create("R1", "cf", "a", 3, KeyValue.Type.Put, "dont-care"),
+ create("R1", "cf", "a", 2, KeyValue.Type.Put, "dont-care"),
+ create("R1", "cf", "a", 1, KeyValue.Type.Put, "dont-care")
+ };
+ List<KeyValueScanner> scanners = Arrays.asList(
+ new KeyValueScanner[]{
+ new KeyValueScanFixture(CellComparator.getInstance(), kvs)
+ });
+
+ BinaryComparator comp = new BinaryComparator(Bytes.toBytes("a"));
+ Filter filter = new QualifierFilter(CompareOperator.EQUAL, comp);
+ Scan scanSpec = new
Scan().withStartRow(Bytes.toBytes("R1")).readVersions(2).setRaw(true);
+ scanSpec.setFilter(filter);
+ try (StoreScanner scan = new StoreScanner(scanSpec, scanInfo, null,
scanners)) {
+ List<Cell> results = new ArrayList<>();
+ assertEquals(true, scan.next(results));
+ System.out.println(results.toString());
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]