pitrou commented on a change in pull request #11257:
URL: https://github.com/apache/arrow/pull/11257#discussion_r721357395
##########
File path: r/src/compute.cpp
##########
@@ -208,7 +208,7 @@ std::shared_ptr<arrow::compute::FunctionOptions>
make_compute_options(
return out;
}
- if (func_name == "hash_count_distinct") {
+ if (func_name == "count_distinct" || func_name == "hash_count_distinct") {
Review comment:
It's more of a suggestion than a question. Instead of manually mapping
function names to options classes in the R code, just use the facility exported
by the C++ APIs:
https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/function.h#L139-L140
You can get the function object directly from the registry:
https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/registry.h
--
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]