You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2018/11/17 14:28:03 UTC

[GitHub] imay commented on a change in pull request #327: Add path info of replica in catalog

imay commented on a change in pull request #327: Add path info of replica in catalog
URL: https://github.com/apache/incubator-doris/pull/327#discussion_r234410035
 
 

 ##########
 File path: be/src/util/string_util.h
 ##########
 @@ -57,6 +60,23 @@ struct StringCaseLess {
     }
 };
 
+struct PathHash {
+public:
+    std::size_t operator()(const std::string& identifier, const std::string& path) const {
+        std::size_t hash = std::hash<std::string>()(identifier);
+        std::vector<std::string> path_parts;
+        boost::split(path_parts, path, boost::is_any_of("/"));
+        for (std::string part : path_parts) {
 
 Review comment:
   You should use reference for part, And you can use `auto`
   ```suggestion
           for (auto& part : path_parts) {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org