Rewrite conversion in terms of column#15213
Merged
rapids-bot[bot] merged 4 commits intorapidsai:branch-24.04from Mar 8, 2024
Merged
Rewrite conversion in terms of column#15213rapids-bot[bot] merged 4 commits intorapidsai:branch-24.04from
rapids-bot[bot] merged 4 commits intorapidsai:branch-24.04from
Conversation
This was referenced Mar 2, 2024
PointKernel
approved these changes
Mar 7, 2024
davidwendt
approved these changes
Mar 7, 2024
Contributor
davidwendt
left a comment
There was a problem hiding this comment.
Approving C++ changes
bdice
approved these changes
Mar 7, 2024
Contributor
Author
|
/merge |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It looks like soon after I started investigating scalar conversions for #14121 (but well before I made the PR) a major underlying hole was plugged in pyarrow via apache/arrow#36162. Most of #14121 was created to give us a way to handle scalars from pyarrow generically in libcudf. Now that pyarrow scalars can be easily tossed into arrays, we no longer really need separate scalar functions in libcudf; we can simply create an array from the scalar, put it into a table, and then call the table function.
Additionally, arrow also has a function for creating an array from a scalar. This function is not new but was previously undocumented. The builder code added to libcudf in #14121 can be removed and replaced with that factory. The scalar conversion is as simple as calling that arrow function and then using our preexisting
from_arrowfunction on the resulting array.For now this PR is just a simplification of internals. Future PRs will remove the scalar API once we have a more standard path for the conversion of arrays via the C Data Interface.
Checklist