Skip to content

Conversation

@thisisnic
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Copy link
Member

@pitrou pitrou left a 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.

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"]);
Copy link
Member

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>?

Copy link
Member Author

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!

out->n = cpp11::as_cpp<int>(options["n"]);
}
if (!Rf_isNull(options["min_count"])) {
out->min_count = cpp11::as_cpp<int>(options["min_count"]);
Copy link
Member

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>.

@thisisnic thisisnic closed this in 1cbc4a2 Sep 13, 2021
ViniciusSouzaRoque pushed a commit to s1mbi0se/arrow that referenced this pull request Oct 20, 2021
Closes apache#11092 from thisisnic/ARROW-13904_modeoptions

Authored-by: Nic Crane <thisisnic@gmail.com>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants