Alexey Serbin has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/17740 )
Change subject: [util] introduce comparison operators for Slice
......................................................................
[util] introduce comparison operators for Slice
This patch introduces comparison operators for the Slice class.
In my opinion, that improves the readability of the code. Compare:
if (mid_key.compare(target) < 0) {
...
}
vs
if (mid_key < target) {
...
}
CHECK(prev_key.compare(enc_key) < 0);
vs
CHECK(prev_key < enc_key);
if (key_a.compare(key_b) == 0) {
...
}
vs
if (key_a == key_b) {
...
}
I also did other minor code modifications in the code around.
This patch doesn't contain any significant functional changes.
Change-Id: I995803246fb3c21d8fe043b882fc93a87d9c2619
Reviewed-on: http://gerrit.cloudera.org:8080/17740
Reviewed-by: Andrew Wong <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
M src/kudu/cfile/binary_plain_block.cc
M src/kudu/cfile/binary_prefix_block.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/common/encoded_key.h
M src/kudu/common/partition.cc
M src/kudu/common/scan_spec.cc
M src/kudu/common/schema-test.cc
M src/kudu/common/types.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/fs/fs_manager-test.cc
M src/kudu/integration-tests/all_types-itest.cc
M src/kudu/rpc/rpc-test-base.h
M src/kudu/tablet/cbtree-test.cc
M src/kudu/tablet/cfile_set.cc
M src/kudu/tablet/deltamemstore-test.cc
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/memrowset.h
M src/kudu/tablet/rowset_info.cc
M src/kudu/tablet/rowset_tree-test.cc
M src/kudu/tablet/tablet.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/util/memcmpable_varint-test.cc
M src/kudu/util/slice.h
23 files changed, 120 insertions(+), 78 deletions(-)
Approvals:
Andrew Wong: Looks good to me, approved
Alexey Serbin: Verified
--
To view, visit http://gerrit.cloudera.org:8080/17740
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I995803246fb3c21d8fe043b882fc93a87d9c2619
Gerrit-Change-Number: 17740
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>