thisisnic commented on a change in pull request #10598:
URL: https://github.com/apache/arrow/pull/10598#discussion_r661452247



##########
File path: r/src/compute.cpp
##########
@@ -264,6 +264,12 @@ std::shared_ptr<arrow::compute::FunctionOptions> 
make_compute_options(
                                      max_replacements);
   }
 
+  if (func_name == "day_of_week") {
+    using Options = arrow::compute::TemporalComponentExtractionOptions;
+    return 
std::make_shared<Options>(cpp11::as_cpp<bool>(options["one_based_numbering"]),

Review comment:
       @rok Not quite - `one_based_numbering` has a default value of `false` in 
C++, whereas in R it should be `true`.  I _think_ the way to achieve it is to 
not use the C++ defaults and do something similar to this example from another 
compute function: 
https://github.com/apache/arrow/blob/e9fa30406215b76ed6c885302fbfe6075c47badf/r/src/compute.cpp#L244-L254




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