ByteYue commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1067150560
##########
be/src/olap/predicate_creator.h:
##########
@@ -64,7 +64,14 @@ class IntegerPredicateCreator : public
PredicateCreator<ConditionType> {
private:
static CppType convert(const std::string& condition) {
CppType value = 0;
- std::from_chars(condition.data(), condition.data() + condition.size(),
value);
+ // because std::from_chars can't compile on macOS
+ if constexpr (std::is_same_v<CppType, double>) {
+ value = std::stod(condition, nullptr);
+ } else if constexpr (std::is_same_v<CppType, float>) {
+ value = std::stof(condition, nullptr);
Review Comment:
It's curious that std::from_char can't not pass the compilation on MacOS so
i have to use specialization for double and float
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]