Skip to content

Commit

Permalink
[Fix] fix kv_params is null
Browse files Browse the repository at this point in the history
  • Loading branch information
shenyunlong committed Aug 31, 2024
1 parent 214ff68 commit cb92eca
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public byte[] encode() {
idx += len;
}

if (isHbaseQuery) {
if (isHbaseQuery && obKVParams != null) {
len = (int) obKVParams.getPayloadSize();
System.arraycopy(obKVParams.encode(), 0, bytes, idx, len);
idx += len;
Expand Down Expand Up @@ -277,9 +277,13 @@ public long getPayloadContentSize() {

if (isHbaseQuery) {
contentSize += hTableFilter.getPayloadSize();
} else {
contentSize += HTABLE_DUMMY_BYTES.length;
}
if (isHbaseQuery && obKVParams != null) {
contentSize += obKVParams.getPayloadSize();
} else {
contentSize += 2 * HTABLE_DUMMY_BYTES.length;
contentSize += HTABLE_DUMMY_BYTES.length;
}
contentSize += Serialization.getNeedBytes(scanRangeColumns.size());
for (String scanRangeColumn : scanRangeColumns) {
Expand Down

0 comments on commit cb92eca

Please sign in to comment.