Skip to content
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

Closed
wants to merge 19 commits into from

Conversation

thisisnic
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@thisisnic thisisnic marked this pull request as ready for review December 15, 2021 16:41
@thisisnic thisisnic requested a review from jonkeane December 15, 2021 16:48
@thisisnic
Copy link
Member Author

This will need to be updated once #11904 is merged

Copy link
Member

@AlenkaF AlenkaF left a 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?

r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Show resolved Hide resolved
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
@thisisnic
Copy link
Member Author

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?

Sounds good to me!

Copy link
Member

@wjones127 wjones127 left a 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:

  1. 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 🤦 .)
  2. 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"

Copy link
Member

@paleolimbot paleolimbot left a 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 Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
collect()
```

This is possible as a **binding** has been created between the stringr function
Copy link
Member

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.

Copy link
Member Author

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 function str_detect() and the Arrow C++ code, here as a direct mapping
to match_substring_regex. You can see this for yourself by inspecting the
arrow data query object without retrieving the results via collect().

Copy link
Member

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.

r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
Copy link
Member

@jonkeane jonkeane left a 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

r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Outdated Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Show resolved Hide resolved
thisisnic and others added 5 commits December 20, 2021 11:15
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Copy link
Member

@jonkeane jonkeane left a 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!

r/vignettes/developers/bindings.Rmd Show resolved Hide resolved
r/vignettes/developers/bindings.Rmd Show resolved Hide resolved
@thisisnic thisisnic closed this in c9588c5 Dec 21, 2021
@ursabot
Copy link

ursabot commented Dec 21, 2021

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.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.31% ⬆️0.0%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

thisisnic pushed a commit that referenced this pull request Jan 5, 2022
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>
thisisnic pushed a commit that referenced this pull request Jan 5, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants