-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-11515: [R] Bindings for strsplit #10190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4710e2e
33a4447
a370b9a
4677f31
e1aa64f
a3f0738
43120a6
0ecbab4
5615486
9ceff3c
d140155
8f5dcc6
6a7b756
983cb9c
48e8917
45f36c4
abeef7c
1f77d66
2448450
14cf037
fc743e7
22b9256
51d250f
a521405
b758b55
3d4f9ce
7e160ca
f8cfff5
3b66f4f
245c99f
b3884f2
8dfc213
cbc0e78
4b96d07
a567ce1
0a30a69
25ec2f8
1504200
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than setting defaults manually, can you do
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC this didn't work when I tried it
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can confirm that there is no
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They probably should be added in the C++ library, can you do that and/or make another JIRA?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thisisnic could you make a Jira for this please? Thanks!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking about this, @nealrichardson and @ianmcook , it may make sense for Could one perhaps make a case for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That all makes good sense to me but I'm not up to speed on what design conventions we follow in the C++ compute functions. Maybe it'd be best to start a Zulip thread to ask folks about this (Joris, Antonie, Maarten Breddels) to get a better idea of the best change to suggest (if any). |
||
| if (!Rf_isNull(options["max_splits"])) { | ||
| max_splits = cpp11::as_cpp<int64_t>(options["max_splits"]); | ||
| } | ||
| bool reverse = false; | ||
| if (!Rf_isNull(options["reverse"])) { | ||
| reverse = cpp11::as_cpp<bool>(options["reverse"]); | ||
| } | ||
| return std::make_shared<Options>(cpp11::as_cpp<std::string>(options["pattern"]), | ||
| max_splits, reverse); | ||
| } | ||
|
|
||
| if (func_name == "utf8_split_whitespace" || func_name == "ascii_split_whitespace") { | ||
ianmcook marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| using Options = arrow::compute::SplitOptions; | ||
| int64_t max_splits = -1; | ||
| if (!Rf_isNull(options["max_splits"])) { | ||
| max_splits = cpp11::as_cpp<int64_t>(options["max_splits"]); | ||
| } | ||
| bool reverse = false; | ||
| if (!Rf_isNull(options["reverse"])) { | ||
| reverse = cpp11::as_cpp<bool>(options["reverse"]); | ||
| } | ||
| return std::make_shared<Options>(max_splits, reverse); | ||
| } | ||
|
|
||
ianmcook marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if (func_name == "variance" || func_name == "stddev") { | ||
| using Options = arrow::compute::VarianceOptions; | ||
| return std::make_shared<Options>(cpp11::as_cpp<int64_t>(options["ddof"])); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.