This is an automated email from the ASF dual-hosted git repository. rui 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 74c54f39d [VL] Fix negative buffer size (#5441) 74c54f39d is described below commit 74c54f39d92967fc45733a6270ceabfcedd3866b Author: WangGuangxin <wangguangxin...@bytedance.com> AuthorDate: Thu Apr 18 10:42:06 2024 +0800 [VL] Fix negative buffer size (#5441) --- .../scala/org/apache/gluten/execution/RowToVeloxColumnarExec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends-velox/src/main/scala/org/apache/gluten/execution/RowToVeloxColumnarExec.scala b/backends-velox/src/main/scala/org/apache/gluten/execution/RowToVeloxColumnarExec.scala index 05d663d05..f1807fe4f 100644 --- a/backends-velox/src/main/scala/org/apache/gluten/execution/RowToVeloxColumnarExec.scala +++ b/backends-velox/src/main/scala/org/apache/gluten/execution/RowToVeloxColumnarExec.scala @@ -153,7 +153,7 @@ object RowToVeloxColumnarExec { } val rowLength = new ListBuffer[Long]() var rowCount = 0 - var offset = 0 + var offset = 0L val sizeInBytes = row.getSizeInBytes // allocate buffer based on 1st row, but if first row is very big, this will cause OOM // maybe we should optimize to list ArrayBuf to native to avoid buf close and allocate @@ -182,7 +182,7 @@ object RowToVeloxColumnarExec { val unsafeRow = convertToUnsafeRow(row) val sizeInBytes = unsafeRow.getSizeInBytes if ((offset + sizeInBytes) > arrowBuf.capacity()) { - val tmpBuf = arrowAllocator.buffer(((offset + sizeInBytes) * 2).toLong) + val tmpBuf = arrowAllocator.buffer((offset + sizeInBytes) * 2) tmpBuf.setBytes(0, arrowBuf, 0, offset) arrowBuf.close() arrowBuf = tmpBuf --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@gluten.apache.org For additional commands, e-mail: commits-h...@gluten.apache.org