-
Notifications
You must be signed in to change notification settings - Fork 75
enable C++17 support #1142
base: main
Are you sure you want to change the base?
enable C++17 support #1142
Conversation
Signed-off-by: Yuan Zhou <[email protected]>
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/oap-project/native-sql-engine/issues Then could you also rename commit message and pull request title in the following format?
See also: |
Signed-off-by: Yuan Zhou <[email protected]>
9c876c8
to
f5b9a8f
Compare
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
// C++17 based from_chars | ||
// std::from_chars(str.data(), str.data() + str.size(), result); | ||
func_str = " = std::from_chars"; | ||
prepare_ss << "int result = 0" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miss a semicolon after 0
and an #include <charconv>
in wscgapi.hpp
.
// C++17 based from_chars | ||
// std::from_chars(str.data(), str.data() + str.size(), result); | ||
func_str = " = std::from_chars"; | ||
prepare_ss << "long int result = 0" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miss a semicolon after 0
} else if (func_name.compare("castFLOAT4OrNull") == 0) { | ||
func_str = " = std::stof"; | ||
func_str = " = ::arrow_vendored::fast_float::from_chars"; | ||
prepare_ss << "float result = 0" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
} else { | ||
func_str = " = std::stod"; | ||
func_str = " = ::arrow_vendored::fast_float::from_chars"; | ||
prepare_ss << "double result = 0" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Signed-off-by: Yuan Zhou <[email protected]>
Signed-off-by: Yuan Zhou <[email protected]>
@@ -3,8 +3,10 @@ | |||
#include <arrow/buffer.h> | |||
#include <arrow/compute/api.h> | |||
#include <arrow/record_batch.h> | |||
#include <arrow/util/value_parsing.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <arrow/vendored/fast_float/parse_number.h>
should be added here.
And also this arrow pr should be added before this pr merged. https://github.com/oap-project/arrow/pull/173/files
Signed-off-by: Yuan Zhou [email protected]
What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)