This is an automated email from the ASF dual-hosted git repository.
chengchengjin 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 98850be47d [VL] Refactor IndexRange usage in serializeColumnarBatches
(#10006)
98850be47d is described below
commit 98850be47da803638a1f57fd1b11cf20d98f04d0
Author: Zhen Li <[email protected]>
AuthorDate: Mon Jun 23 18:57:23 2025 +0800
[VL] Refactor IndexRange usage in serializeColumnarBatches (#10006)
---
cpp/velox/operators/serializer/VeloxColumnarBatchSerializer.cc | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/cpp/velox/operators/serializer/VeloxColumnarBatchSerializer.cc
b/cpp/velox/operators/serializer/VeloxColumnarBatchSerializer.cc
index 7b858cce21..a35316702a 100644
--- a/cpp/velox/operators/serializer/VeloxColumnarBatchSerializer.cc
+++ b/cpp/velox/operators/serializer/VeloxColumnarBatchSerializer.cc
@@ -66,12 +66,8 @@ std::shared_ptr<arrow::Buffer>
VeloxColumnarBatchSerializer::serializeColumnarBa
auto serializer = serde_->createIterativeSerializer(rowType, numRows,
arena.get(), &options_);
for (auto& batch : batches) {
auto rowVector = VeloxColumnarBatch::from(veloxPool_.get(),
batch)->getRowVector();
- numRows = rowVector->size();
- std::vector<IndexRange> rows(numRows);
- for (int i = 0; i < numRows; i++) {
- rows[i] = IndexRange{i, 1};
- }
- serializer->append(rowVector, folly::Range(rows.data(), numRows));
+ const IndexRange allRows{0, rowVector->size()};
+ serializer->append(rowVector, folly::Range(&allRows, 1));
}
std::shared_ptr<arrow::Buffer> valueBuffer;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]