Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ci test error
Browse files Browse the repository at this point in the history
JackyYangPassion committed Mar 30, 2023
1 parent ff68641 commit b5d08eb
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -419,12 +419,17 @@ default R scan(String table, Set<byte[]> prefixes) {
*/
default R scan(String table, byte[] startRow, boolean inclusiveStart,
byte[] prefix) {
short value = (short) (((startRow[0] << 8) | (startRow[1] & 0xFF)) +1);
byte[] endRow = ByteBuffer.allocate(2).putShort(value).array();

Scan scan = new Scan().withStartRow(startRow, inclusiveStart)
.withStopRow(endRow)
.setFilter(new PrefixFilter(prefix));
Scan scan = new Scan();
if (table.equals("g_oe") || table.equals("g_ie")) {
short value = (short) (((startRow[0] << 8) | (startRow[1] & 0xFF)) +1);
byte[] endRow = ByteBuffer.allocate(2).putShort(value).array();
scan.withStartRow(startRow, inclusiveStart)
.withStopRow(endRow)
.setFilter(new PrefixFilter(prefix));
} else {
scan.withStartRow(startRow, inclusiveStart)
.setFilter(new PrefixFilter(prefix));
}
return this.scan(table, scan);
}

0 comments on commit b5d08eb

Please sign in to comment.