alanstoate commented on code in PR #41477:
URL: https://github.com/apache/arrow/pull/41477#discussion_r1604700787
##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -1868,24 +1868,18 @@ struct ArrayImporter {
template <typename OffsetType>
Status ImportStringValuesBuffer(int32_t offsets_buffer_id, int32_t buffer_id,
int64_t byte_width = 1) {
- if (device_type_ == DeviceAllocationType::kCPU) {
- auto offsets = data_->GetValues<OffsetType>(offsets_buffer_id);
+ int64_t last_offset_value_offset =
+ (c_struct_->length + c_struct_->offset) * sizeof(OffsetType);
+ OffsetType last_offset_value;
+ RETURN_NOT_OK(MemoryManager::CopyBufferSlice(
+ data_->buffers[offsets_buffer_id], last_offset_value_offset,
sizeof(OffsetType),
+ reinterpret_cast<uint8_t*>(&last_offset_value)));
+
+ int64_t buffer_size = 0;
+ if (c_struct_->length > 0) {
Review Comment:
🤦 whoops, thanks!
--
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]