-
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
GH-37199: [C++] Expose a span converter for Buffer and ArraySpan #38027
GH-37199: [C++] Expose a span converter for Buffer and ArraySpan #38027
Conversation
|
General looks ok to me, cc @bkietz |
I think it'd be better to avoid tying this to the concrete Array classes. The span would expose values masked by null bits which could lead to unfortunate surprises. FWIW these classes already expose I think it'd be more useful to expose such a helper at the buffer or array data level, for example as
|
You have a valid point and I think that makes a lot of sense. |
That sounds ok to me. |
7e69c43
to
ccd34ac
Compare
72dcf01
to
7c50bd4
Compare
7c50bd4
to
4fcc934
Compare
Sorry for the abuse of CI, my local env was messed up accidentally :( |
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, one more change:
4fcc934
to
b357cb5
Compare
313f86c
to
d8938ca
Compare
d8938ca
to
d843ba4
Compare
dc04c48
to
414e206
Compare
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0552217. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
apache#38027) ### Rationale for this change Convenience. We can have such a helper at the buffer and array data level. ### What changes are included in this PR? Add `Buffer::span_as`, `Buffer::mutuable_span_as` and `ArraySpan::GetSpan`. ### Are these changes tested? No, but I'm happy to add some test if needed. ### Are there any user-facing changes? Yes, new public functions. * Closes: apache#37199 Authored-by: jsjtxietian <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
apache#38027) ### Rationale for this change Convenience. We can have such a helper at the buffer and array data level. ### What changes are included in this PR? Add `Buffer::span_as`, `Buffer::mutuable_span_as` and `ArraySpan::GetSpan`. ### Are these changes tested? No, but I'm happy to add some test if needed. ### Are there any user-facing changes? Yes, new public functions. * Closes: apache#37199 Authored-by: jsjtxietian <[email protected]> Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
Rationale for this change
Convenience. We can have such a helper at the buffer and array data level.
What changes are included in this PR?
Add
Buffer::span_as
,Buffer::mutuable_span_as
andArraySpan::GetSpan
.Are these changes tested?
No, but I'm happy to add some test if needed.
Are there any user-facing changes?
Yes, new public functions.