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



##########
File path: r/src/compute.cpp
##########
@@ -233,6 +233,33 @@ std::shared_ptr<arrow::compute::FunctionOptions> 
make_compute_options(
                                      max_replacements);
   }
 
+  if (func_name == "split_pattern") {
+    using Options = arrow::compute::SplitPatternOptions;
+    int64_t max_splits = -1;

Review comment:
       Thinking about this, @nealrichardson and @ianmcook , it may make sense 
for `arrow::compute::SplitPatternOptions` not to have defaults, given that the 
`pattern` is one of the options - it might not make sense to pre-specify a 
pattern to split the string on?  Neither of the R functions `strsplit` nor 
`stringr::str_split` have defaults for this argument.  
   
   Could one perhaps make a case for `pattern` moving from being an option to 
instead being a second input, similarly to how `arrow::compute::filter` and 
`arrow::compute::take` operate?  At that point, having defaults for 
`SplitPatternOptions` feels more natural.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to