This is an automated email from the ASF dual-hosted git repository.
yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 5d79530f9b [GLUTEN-10833][VL] Reduce memcpy in ColumnToRow (#10824)
5d79530f9b is described below
commit 5d79530f9b75a73585b97307695c69c520a6daa7
Author: Yuan <[email protected]>
AuthorDate: Thu Oct 16 16:50:46 2025 +0100
[GLUTEN-10833][VL] Reduce memcpy in ColumnToRow (#10824)
We always fill the buffer with 0 so it's no necessary to keep the old
content when doing allocation in C2R
Fixes #10833
---------
Signed-off-by: Yuan <[email protected]>
---
cpp/velox/operators/serializer/VeloxColumnarToRowConverter.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/cpp/velox/operators/serializer/VeloxColumnarToRowConverter.cc
b/cpp/velox/operators/serializer/VeloxColumnarToRowConverter.cc
index 49fd05ffd4..cbf25ff7ba 100644
--- a/cpp/velox/operators/serializer/VeloxColumnarToRowConverter.cc
+++ b/cpp/velox/operators/serializer/VeloxColumnarToRowConverter.cc
@@ -57,10 +57,8 @@ void
VeloxColumnarToRowConverter::refreshStates(facebook::velox::RowVectorPtr ro
numRows_ = endRow - startRow;
}
- if (nullptr == veloxBuffers_) {
+ if (nullptr == veloxBuffers_ || veloxBuffers_->capacity() < totalMemorySize)
{
veloxBuffers_ = velox::AlignedBuffer::allocate<uint8_t>(totalMemorySize,
veloxPool_.get());
- } else if (veloxBuffers_->capacity() < totalMemorySize) {
- velox::AlignedBuffer::reallocate<uint8_t>(&veloxBuffers_, totalMemorySize);
}
bufferAddress_ = veloxBuffers_->asMutable<uint8_t>();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]