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 ac0611a9c5 [GLUTEN-10933][VL]fix: Fix the CudfVector childreSize is 
not correct (#11326)
ac0611a9c5 is described below

commit ac0611a9c52779d784986399c89a19445de60412
Author: Jin Chengcheng <[email protected]>
AuthorDate: Tue Jan 6 17:37:15 2026 +0800

    [GLUTEN-10933][VL]fix: Fix the CudfVector childreSize is not correct 
(#11326)
---
 cpp/velox/memory/VeloxColumnarBatch.h    | 7 +++++++
 cpp/velox/utils/GpuBufferBatchResizer.cc | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cpp/velox/memory/VeloxColumnarBatch.h 
b/cpp/velox/memory/VeloxColumnarBatch.h
index cecadd3cdf..4b83d302a0 100644
--- a/cpp/velox/memory/VeloxColumnarBatch.h
+++ b/cpp/velox/memory/VeloxColumnarBatch.h
@@ -29,6 +29,13 @@ class VeloxColumnarBatch final : public ColumnarBatch {
   VeloxColumnarBatch(facebook::velox::RowVectorPtr rowVector)
       : ColumnarBatch(rowVector->childrenSize(), rowVector->size()), 
rowVector_(rowVector) {}
 
+#ifdef GLUTEN_ENABLE_GPU
+  // The batch may be CudfVector, it's childrenSize is not correct, many tests 
failed if correcting the value
+  // 
https://github.com/facebookincubator/velox/pull/15629#discussion_r2581655771
+  VeloxColumnarBatch(facebook::velox::RowVectorPtr rowVector, int32_t 
numColumns)
+      : ColumnarBatch(numColumns, rowVector->size()), rowVector_(rowVector) {}
+#endif
+
   std::string getType() const override {
     return kType;
   }
diff --git a/cpp/velox/utils/GpuBufferBatchResizer.cc 
b/cpp/velox/utils/GpuBufferBatchResizer.cc
index ad98fd4701..518f280fc3 100644
--- a/cpp/velox/utils/GpuBufferBatchResizer.cc
+++ b/cpp/velox/utils/GpuBufferBatchResizer.cc
@@ -159,7 +159,7 @@ std::shared_ptr<VeloxColumnarBatch> makeCudfTable(
   auto cudfTable = std::make_unique<cudf::table>(std::move(cudfColumns));
   stream.synchronize();
   return std::make_shared<VeloxColumnarBatch>(
-      std::make_shared<cudf_velox::CudfVector>(pool, type, numRows, 
std::move(cudfTable), stream));
+      std::make_shared<cudf_velox::CudfVector>(pool, type, numRows, 
std::move(cudfTable), stream), type->size());
 }
 
 } // namespace


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to