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

GH-36264: [R] Add scalar() function #36265

Merged
merged 4 commits into from
Jun 23, 2023
Merged

Conversation

thisisnic
Copy link
Member

@thisisnic thisisnic commented Jun 23, 2023

@thisisnic
Copy link
Member Author

thisisnic commented Jun 23, 2023

I feel like there may be a reason we haven't done this previously, though a cursory glance to see if it's an exported function from other packages (I just ran ??scalar locally) didn't turn up any results.

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Jun 23, 2023
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.

Definitely worth having! Perhaps it didn't happen because we also have Expression$scalar() which is what all the bindings use.

It's true that scalar() is a tiny bit generic...the closest thing I found was rlang::is_scalar_xx() and assertthat::is.scalar() (which helpfully returns TRUE for an arrow::Scalar. I think it's fine! There's always arrow_scalar() if you're worried.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jun 23, 2023
@thisisnic
Copy link
Member Author

It's true that scalar() is a tiny bit generic...the closest thing I found was rlang::is_scalar_xx() and assertthat::is.scalar() (which helpfully returns TRUE for an arrow::Scalar. I think it's fine! There's always arrow_scalar() if you're worried.

Thanks for looking for those! If you're happy with this as-is, I'm happy too. Will merge once CI is green.

@thisisnic thisisnic merged commit ed99693 into apache:main Jun 23, 2023
10 checks passed
@github-actions
Copy link

⚠️ GitHub issue #36264 has been automatically assigned in GitHub to PR creator.

@conbench-apache-arrow
Copy link

Conbench analyzed the 6 benchmark runs on commit ed996933.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R] Add scalar() function
2 participants