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 :( |
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 <jsjtxietian@outlook.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
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_asandArraySpan::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.