-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-13834: [R][Documentation] Document the process of creating R bindings for compute kernels and rationale behind conventions #11915
Conversation
|
This will need to be updated once #11904 is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work Nic! Not much to comment on, everything is very clear.
Also this PR fits nicely with the guide content. I would link to this document from two parts of the guide (bindings and the tutorial). What do you think?
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Sounds good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! My only two suggestions are:
- Like Alenka said, explain why we are starting with tests. (I totally agree with this move, as someone who often will write tests at the end only to realize later they wouldn't have failed prior to my changes 🤦 .)
- Consider combining steps 3 and 4 into one with subsections. For example, "Step 3: Map the R function to the C++ kernel", "Option a: use direct mapping if there are no options class", "Option b: add explicit implementation to nse_funcs"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments...it looks great! One is rather amorphous (the term "binding") but that's just a search/replace if or when the term changes (so shouldn't affect this getting merged).
r/vignettes/developers/bindings.Rmd
Outdated
collect() | ||
``` | ||
|
||
This is possible as a **binding** has been created between the stringr function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit has me questioning the term "binding"...whereas str_detect()
and match_substring_regex
is a 1:1 link, many "bindings" implement a few Arrow compute functions linked together. I'm not sure that either terminology "we created an Arrow binding for str_detect()` or "we created an R binding for match_substring_regex" are correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this point, yeah, I see what you mean; this could cause confusion. What about now that I've rephrased it?
This is possible as a binding has been created between the call to the
stringr functionstr_detect()
and the Arrow C++ code, here as a direct mapping
tomatch_substring_regex
. You can see this for yourself by inspecting the
arrow data query object without retrieving the results viacollect()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this last week! I like how you've rephrased it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. Thank you for the care and detail you've put into this. A few comments and a few minor linter clean ups.
I don't think there will be much, but we should make sure to come back and fix up anything if/when #11904 merges
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, thanks for all the work. I’ve got two minor comments, you’re welcome to take or leave and then merge away!
Benchmark runs are scheduled for baseline = f165370 and contender = c9588c5. c9588c5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Add a short intro and a link to the [ARROW-13834](#11915): Walkthrough section content. Closes #12016 from AlenkaF/ARROW-14603 Authored-by: Alenka Frim <frim.alenka@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
Add a tab for R bindings in the **Working on the Arrow codebase** section of the guide plus a link to the [ARROW-13834](#11915): Writing Bindings section content. Closes #12018 from AlenkaF/ARROW-14757 Authored-by: Alenka Frim <frim.alenka@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
No description provided.