Todd Lipcon has posted comments on this change. Change subject: generic_iterators: avoid holding completed iters in merge/union ......................................................................
Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/6460/1/src/kudu/common/generic_iterators.cc File src/kudu/common/generic_iterators.cc: Line 325: iters_.assign(iters.begin(), iters.end()); > Would it make sense to std::move(iters) here as well? Do we not do this to iters_ here is a std::deque whereas 'iters' is a vector, so we have to use the assign() to copy the elements rather than just move them http://gerrit.cloudera.org:8080/#/c/6460/1/src/kudu/common/generic_iterators.h File src/kudu/common/generic_iterators.h: Line 43: // a subset of the columns in 'iters'. > Not sure if this is the right place, but it might be nice to note the reaso well, since C++11 we've actually moved more towards this style for arguments which end up copied inside the implementation. This style is pass-by-copy, but then the copy itself is moved (note it's not an rvalue-reference here). So, the caller isn't actually transferring ownership unless they do std::move() themselves. -- To view, visit http://gerrit.cloudera.org:8080/6460 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e068c256c5855efeff5c6325dbb5fbf770eb900 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
