Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14147 )
Change subject: [cfile] Fix the default encoding mappings ...................................................................... Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/14147/1/src/kudu/cfile/type_encodings.cc File src/kudu/cfile/type_encodings.cc: http://gerrit.cloudera.org:8080/#/c/14147/1/src/kudu/cfile/type_encodings.cc@284 PS1, Line 284: if (default_mapping_.find(type) == default_mapping_.end()) { Could you use ContainsKey from gutil/map-util.h? It's more idiomatic. Alternatively, you could avoid the find() altogether: emplace() will no-op if the key is already present, so if we guarantee that the first call to AddMapping for a given data-type is always the default one, we can blindly call emplace() here. -- To view, visit http://gerrit.cloudera.org:8080/14147 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I646715b939a5222b8178117234d9f2acf3c550df Gerrit-Change-Number: 14147 Gerrit-PatchSet: 1 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Tue, 27 Aug 2019 18:34:24 +0000 Gerrit-HasComments: Yes
