This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new a61205fd9e GH-43447: [C++] FIlter out zero length buffers on gRPC
transport (#43448)
a61205fd9e is described below
commit a61205fd9ee26ccdc9502058da6cc2edb07e61ac
Author: ziglerari <[email protected]>
AuthorDate: Mon Jul 29 09:35:59 2024 +0300
GH-43447: [C++] FIlter out zero length buffers on gRPC transport (#43448)
#43447
* GitHub Issue: #43447
Authored-by: Ari Zigler <[email protected]>
Signed-off-by: David Li <[email protected]>
---
cpp/src/arrow/flight/transport/grpc/serialization_internal.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc
b/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc
index 372dca7a2c..3df13532b0 100644
--- a/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc
+++ b/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc
@@ -284,7 +284,7 @@ static const uint8_t kPaddingBytes[8] = {0, 0, 0, 0, 0, 0,
0, 0};
for (const auto& buffer : ipc_msg.body_buffers) {
// Buffer may be null when the row length is zero, or when all
// entries are invalid.
- if (!buffer) continue;
+ if (!buffer || buffer->size() == 0) continue;
::grpc::Slice slice;
auto status = SliceFromBuffer(buffer).Value(&slice);