lingbin commented on a change in pull request #2277: Replace boost::split()
with strings::Split() in options
URL: https://github.com/apache/incubator-doris/pull/2277#discussion_r349918183
##########
File path: be/src/olap/options.cpp
##########
@@ -17,26 +17,35 @@
#include "olap/options.h"
-#include <boost/algorithm/string.hpp>
-#include <boost/algorithm/string/classification.hpp>
-#include <boost/algorithm/string/split.hpp>
+#include <algorithm>
#include "common/logging.h"
-
#include "olap/utils.h"
+#include "gutil/strings/split.h"
+
namespace doris {
+static std::string CAPACITY_UC = "CAPACITY";
+static std::string MEDIUM_UC = "MEDIUM";
+static std::string SSD_UC = "SSD";
+static std::string HDD_UC = "HDD";
+
+// TODO: should be a general util method
+std::string to_upper(const std::string& str) {
+ std::string out = str;
+ std::transform(out.begin(), out.end(), out.begin(), ::toupper);
Review comment:
It's only copied once. It's modified in place in `transform()`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]