This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new a45192f [common] Exit the loop when there is nothing left to decode
a45192f is described below
commit a45192f06610b1db7fefd5bcd57f365eee6c92e1
Author: lingbin <[email protected]>
AuthorDate: Thu Oct 17 20:46:57 2019 +0800
[common] Exit the loop when there is nothing left to decode
Change-Id: I74c62c02e4e547831d3213dc0e7d9704d53d9bb6
Reviewed-on: http://gerrit.cloudera.org:8080/14483
Reviewed-by: Bankim Bhavsar <[email protected]>
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Adar Dembo <[email protected]>
---
src/kudu/common/partition.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/kudu/common/partition.cc b/src/kudu/common/partition.cc
index 7bcfd34..02b9062 100644
--- a/src/kudu/common/partition.cc
+++ b/src/kudu/common/partition.cc
@@ -499,11 +499,10 @@ Status PartitionSchema::DecodeRangeKey(Slice* encoded_key,
Arena* arena) const {
ContiguousRow cont_row(row->schema(), row->row_data_);
for (int i = 0; i < range_schema_.column_ids.size(); i++) {
-
if (encoded_key->empty()) {
// This can happen when decoding partition start and end keys, since they
// are truncated to simulate absolute upper and lower bounds.
- continue;
+ break;
}
int32_t column_idx =
row->schema()->find_column_by_id(range_schema_.column_ids[i]);