nealrichardson commented on a change in pull request #11357:
URL: https://github.com/apache/arrow/pull/11357#discussion_r724383885



##########
File path: r/src/compute.cpp
##########
@@ -254,6 +254,11 @@ std::shared_ptr<arrow::compute::FunctionOptions> 
make_compute_options(
                                      
cpp11::as_cpp<bool>(options["skip_nulls"]));
   }
 
+  if (func_name == "index") {
+    using Options = arrow::compute::IndexOptions;
+    return 
std::make_shared<Options>(cpp11::as_cpp<arrow::Scalar>(options["value"]));

Review comment:
       I doubt that will work because you still have to convert somewhere from 
R objects (`SEXP`) to Arrow. 
   
   I see the one above does `cpp11::as_cpp<arrow::Datum>`, and I know for those 
kernels we create the Scalar or Array in the R layer. So we could have that 
requirement here, and just make sure that we don't crash if it's not that type. 




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


Reply via email to