Hello Andrew Wong, Grant Henke, I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/15550 to review the following change. Change subject: wire_protocol: some simplification and optimization for rowwise encoding ...................................................................... wire_protocol: some simplification and optimization for rowwise encoding * Re-implement GetSelectedRows based on the new ForEachSetBit(...) utility, which operates word-by-word instead of byte-by-byte. * use boost::none as a special case return value which indicates the common case of "all rows are selected". Currently the rowwise serialization code path doesn't use this special value (and just reproduces the old std::iota() call to generate the sequence of all indexes), but the columnar code path will special case this as a memcpy. * Avoid one call to CountSelected() in SerializeRowBlock() by calculating num_rows from the size of the row index vector. * Change SerializeRowBlock() to return an int indicating the number of rows selected, instead of accumulating it into the protobuf. This value can then be re-used to eliminate one extra call to CountSelected in ScanResultCopier::HandleRowBlock(). After this change, the protobuf is no longer used by SerializeRowBlock, so I removed the parameter, which required a bit of fixup in the tests. Change-Id: I24dfb1bd036fde514ca6494bae0ddc171dd225dd --- M src/kudu/common/rowblock-test.cc M src/kudu/common/rowblock.cc M src/kudu/common/rowblock.h M src/kudu/common/wire_protocol-test.cc M src/kudu/common/wire_protocol.cc M src/kudu/common/wire_protocol.h M src/kudu/tserver/tablet_service.cc 7 files changed, 95 insertions(+), 62 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/50/15550/1 -- To view, visit http://gerrit.cloudera.org:8080/15550 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I24dfb1bd036fde514ca6494bae0ddc171dd225dd Gerrit-Change-Number: 15550 Gerrit-PatchSet: 1 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org>