Repository navigation
GH-55685: [C++][Parquet] Fix zero-length append in DeltaLengthByteArrayEncoder - #55729
aditya07-ui wants to merge 1 commit into
Conversation
|
Not a maintainer, just a bystander who looked into this...the len > 0 check makes total sense to avoid passing nullptr to memcpy on empty ByteArrays. Don't you think it'd be worth adding a quick unit test in encoding_test.cc for ByteArray(0, nullptr)? Also, I saw #55685 mentions the MemoryPool* constructor bug (and PutSpaced might need this same guard too), and you might want to fill out the standard Apache Arrow PR template description so reviewers have all the context they'd need. Otherwise looks good to me...let's wait for a maintainer review though. |
That's an interesting suggestion, especially if it's made to work on all encodings that support BYTE_ARRAY. |
|
That said, there is already #55686 open that fixes the same issue and looks more complete. |
Summary
Skip UnsafeAppend when the byte array length is zero.
Avoid passing a potentially null pointer to the append operation for zero-length values.
Testing
Not tested locally yet.