-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-13904: [R] Implement ModeOptions #11092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pitrou
left a comment
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.
A quick review on the C++ part. I won't comment on the R tests.
r/src/compute.cpp
Outdated
| using Options = arrow::compute::ModeOptions; | ||
| auto out = std::make_shared<Options>(Options::Defaults()); | ||
| if (!Rf_isNull(options["n"])) { | ||
| out->n = cpp11::as_cpp<int>(options["n"]); |
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.
ModeOptions::n is an int64_t, so perhaps use cpp11::as_cpp<int64_t>?
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.
Cheers for spotting that, will update them both!
r/src/compute.cpp
Outdated
| out->n = cpp11::as_cpp<int>(options["n"]); | ||
| } | ||
| if (!Rf_isNull(options["min_count"])) { | ||
| out->min_count = cpp11::as_cpp<int>(options["min_count"]); |
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.
For the same reason, perhaps cpp11::as_cpp<uint32_t>.
Closes apache#11092 from thisisnic/ARROW-13904_modeoptions Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
No description provided.