-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-34535: [C++] Move ChunkResolver to the public API #44357
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: SChakravorti21<[email protected]>
I'm aware of the build failures and actively resolving them! |
For the failing R builds, this conversation needs to be resolved: #43623 |
e047151
to
786a055
Compare
375ef57
to
994ffc8
Compare
994ffc8
to
a838fd0
Compare
Yes, I agree this API should be made public. I've added tests and benchmarks recently [1]. [1] #43954 |
Please add a (Edit: Turns out PRs are merged via a script, and not a manual squash.) |
3646d0f
to
3d3e1be
Compare
I amended @SChakravorti21 as an author in a recent commit, so that the merge script will pick them up as a co-author. |
…_job Guard ChunkResolver use in altrep.cpp
@@ -80,20 +80,26 @@ void DeletePointer(std::shared_ptr<T>* ptr) { | |||
template <typename T> | |||
using Pointer = cpp11::external_pointer<std::shared_ptr<T>, DeletePointer<T>>; | |||
|
|||
#if ARROW_MAJOR_VERSION >= 18 |
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.
#if ARROW_MAJOR_VERSION >= 18 | |
#if ARROW_VERSION_MAJOR >= 18 |
atm the wrong branch get's picked: https://github.com/apache/arrow/actions/runs/11407714122/job/31744347738?pr=44357#step:7:29940
See arrow/util/config.h
Rationale for this change
Adopting #40226.
The creation and return of a shared_ptr does result in some performance overhead, that makes a difference for a performance-sensitive application.
If someone could use ChunkResolver to learn the indices, they could then instead access the data directly.
What changes are included in this PR?
ChunkResolver
to public API, and updating all references to it in the codeAre these changes tested?
There seemed to be comprehensive tests already: https://github.com/apache/arrow/blob/main/cpp/src/arrow/chunked_array_test.cc#L324 If an edgecase is missing, I'd be happy to add it.
Are there any user-facing changes?
ChunkResolver
andTypedChunkLocation
are now in the public API.