bkietz commented on code in PR #36018:
URL: https://github.com/apache/arrow/pull/36018#discussion_r1231097263
##########
cpp/src/arrow/array/data.cc:
##########
@@ -265,13 +266,12 @@ int GetNumBuffers(const DataType& type) {
namespace internal {
void FillZeroLengthArray(const DataType* type, ArraySpan* span) {
- memset(span->scratch_space, 0x00, sizeof(span->scratch_space));
-
span->type = type;
span->length = 0;
int num_buffers = GetNumBuffers(*type);
for (int i = 0; i < num_buffers; ++i) {
- span->buffers[i].data = reinterpret_cast<uint8_t*>(span->scratch_space);
+ static int64_t zero{0};
+ span->buffers[i].data = reinterpret_cast<uint8_t*>(&zero);
Review Comment:
This buffer is not allowed to be null, since it holds offsets
--
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]