[ https://issues.apache.org/jira/browse/HBASE-19729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16316011#comment-16316011 ]
Zheng Hu commented on HBASE-19729: ---------------------------------- BTW, after discussed with [~zghaobac] offline, we found another relative bug: {code} public class TestScanWithFilterAndMaxVersion { public final static HBaseTestingUtility UTIL = new HBaseTestingUtility(); public static TableName TABLE_NAME = TableName.valueOf("test"); public static byte[] ROW = Bytes.toBytes("r"); public static byte[] FAMILY = Bytes.toBytes("f"); public static byte[] QUALIFY = Bytes.toBytes("q"); public static byte[] VALUE = Bytes.toBytes("v"); @Test public void test() throws Exception { UTIL.startMiniCluster(); Table table = UTIL.createTable(TABLE_NAME, FAMILY, 4); for (int i = 0; i < 4; i++) { Put put = new Put(ROW); put.addColumn(FAMILY, QUALIFY, VALUE); table.put(put); } Scan scan = new Scan(); scan.addColumn(FAMILY, QUALIFY); scan.setFilter(new QualifierFilter(CompareOperator.EQUAL, new BinaryComparator(QUALIFY))); scan.readVersions(3); try (ResultScanner scanner = table.getScanner(scan)) { Result result = scanner.next(); Assert.assertEquals(3, result.size()); } } } {code} In short, when a scan with specific columns & filter to return INCLUDE* & specific version to read, the scanner may return cells more than the specific version. Will fix this bug in this patch. > UserScanQueryMatcher#mergeFilterResponse should return > INCLUDE_AND_SEEK_NEXT_ROW when filterResponse is INCLUDE_AND_SEEK_NEXT_ROW > --------------------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-19729 > URL: https://issues.apache.org/jira/browse/HBASE-19729 > Project: HBase > Issue Type: Bug > Reporter: Zheng Hu > Assignee: Zheng Hu > Attachments: HBASE-19729.v1.patch > > > As we've discussed in HBASE-19696 > https://issues.apache.org/jira/browse/HBASE-19696?focusedCommentId=16309644&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16309644 > when (filterResponse, matchCode) = (INCLUDE_AND_SEEK_NEXT_ROW, INCLUDE) or > (INCLUDE_AND_SEEK_NEXT_ROW, INCLUDE_AND_NEXT_COL) , we should return > INCLUDE_AND_SEEK_NEXT_ROW as the merged match code. > Will upload patches for all branches. -- This message was sent by Atlassian JIRA (v6.4.14#64029)