Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

enable C++17 support #1142

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

enable C++17 support #1142

wants to merge 6 commits into from

Conversation

zhouyuan
Copy link
Collaborator

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)

Signed-off-by: Yuan Zhou <[email protected]>
@github-actions
Copy link

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?

[NSE-${ISSUES_ID}] ${detailed message}

See also:

@zhouyuan zhouyuan force-pushed the wip_c++17 branch 2 times, most recently from 9c876c8 to f5b9a8f Compare October 24, 2022 07:02
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;
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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>
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants