[ https://issues.apache.org/jira/browse/HBASE-21618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725547#comment-16725547 ]
Guanghao Zhang commented on HBASE-21618: ---------------------------------------- ProtobufUtil#toScan method will change the includeStopRow to true for old client which doesn't has this flag. But the new client only set this flag when scan.includeStopRow is true. {code:java} // protoScan ==> scan if (proto.hasIncludeStopRow()) { includeStopRow = proto.getIncludeStopRow(); } else { // old client without this flag, we should consider start=end as a get. if (ClientUtil.areScanStartRowAndStopRowEqual(startRow, stopRow)) { includeStopRow = true; } } // scan ==> protoScan if (scan.includeStopRow()) { scanBuilder.setIncludeStopRow(true); } {code} > Scan with the same startRow(inclusive=true) and stopRow(inclusive=false) > returns one result > ------------------------------------------------------------------------------------------- > > Key: HBASE-21618 > URL: https://issues.apache.org/jira/browse/HBASE-21618 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 2.0.2 > Environment: hbase server 2.0.2 > hbase client 2.0.0 > Reporter: Jermy Li > Priority: Major > Attachments: HBASE-21618.master.001.patch > > > I expect the following code to return none result, but still return a row: > {code:java} > byte[] rowkey = "some key existed"; > Scan scan = new Scan(); > scan.withStartRow(rowkey, true); > scan.withStopRow(rowkey, false); > htable.getScanner(scan); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)