Todd Lipcon has posted comments on this change.

Change subject: Add ComputeIfAbsent methods to map-util
......................................................................


Patch Set 3:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/3593/3/src/kudu/gutil/map-util.h
File src/kudu/gutil/map-util.h:

PS3, Line 779: it 
exist


PS3, Line 791: std::function<typename MapContainer::value_type::second_type ()> 
rather than using std::function I think you can templatize on a function type 
here. http://stackoverflow.com/questions/14677997/stdfunction-vs-template seems 
to agree this is usually preferred (the optimizer isn't always smart enough to 
see the equivalence)


PS3, Line 795: CH
I think a DCHECK would be better here, since we probably want this function to 
be as small as possible to be inlined


Line 806: ComputeIfAbsentReturnAbsense(MapContainer* container,
could you implement ComputeIfAbsent as just calling 
ComputeIfAbsentReturnAbsense?


http://gerrit.cloudera.org:8080/#/c/3593/3/src/kudu/util/map-util-test.cc
File src/kudu/util/map-util-test.cc:

PS3, Line 54:  {
nit: inconsistent spacing (also below)


-- 
To view, visit http://gerrit.cloudera.org:8080/3593
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba9fa8038e699e66d34ce541cd02c77f46691315
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to