bkietz commented on code in PR #35628:
URL: https://github.com/apache/arrow/pull/35628#discussion_r1231443509
##########
cpp/src/arrow/array/data.cc:
##########
@@ -214,6 +214,14 @@ void ArraySpan::SetMembers(const ArrayData& data) {
this->buffers[i] = {};
}
+ if (type_id == Type::STRING_VIEW || type_id == Type::BINARY_VIEW) {
+ // store the span of character buffers in the third buffer
+ this->buffers[2].data =
+ const_cast<uint8_t*>(reinterpret_cast<const
uint8_t*>(data.buffers.data() + 2));
+ this->buffers[2].size =
+ static_cast<int64_t>(data.buffers.size() - 2) *
sizeof(std::shared_ptr<Buffer>);
Review Comment:
It's used! We can't access index/offset views without all the character
buffers. Since ArraySpan has a compile-time limit of three buffers, there's
nowhere else to put these
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]