Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15550 )
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 a boolean 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 Reviewed-on: http://gerrit.cloudera.org:8080/15550 Reviewed-by: Grant Henke <granthe...@apache.org> Tested-by: Todd Lipcon <t...@apache.org> --- 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, 89 insertions(+), 67 deletions(-) Approvals: Grant Henke: Looks good to me, approved Todd Lipcon: Verified -- 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: merged Gerrit-Change-Id: I24dfb1bd036fde514ca6494bae0ddc171dd225dd Gerrit-Change-Number: 15550 Gerrit-PatchSet: 4 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <t...@apache.org>