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 4542c08f21 [GLUTEN-10607][MINOR] Fix: Use setSafe in DateWriter to 
avoid overflow (#10581)
4542c08f21 is described below

commit 4542c08f21da3a7748129b3fc45b05f290734081
Author: jiangjiangtian <[email protected]>
AuthorDate: Wed Sep 3 21:29:07 2025 +0800

    [GLUTEN-10607][MINOR] Fix: Use setSafe in DateWriter to avoid overflow 
(#10581)
    
    If the Date type is nested within an Array, Map, or Struct, invoking 
writeRow may result in an exception due to DateWriter utilizing the unsafe set 
interface. The set interface does not reallocate the value buffer in cases of 
overflow. Consequently, this pull request changes to use the safer setSafe 
interface.
    
    Co-authored-by: 蒋添 <[email protected]>
---
 .../java/org/apache/gluten/vectorized/ArrowWritableColumnVector.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/gluten-arrow/src/main/java/org/apache/gluten/vectorized/ArrowWritableColumnVector.java
 
b/gluten-arrow/src/main/java/org/apache/gluten/vectorized/ArrowWritableColumnVector.java
index 0d74b7d4ac..eb50cbcbe8 100644
--- 
a/gluten-arrow/src/main/java/org/apache/gluten/vectorized/ArrowWritableColumnVector.java
+++ 
b/gluten-arrow/src/main/java/org/apache/gluten/vectorized/ArrowWritableColumnVector.java
@@ -1930,7 +1930,7 @@ public final class ArrowWritableColumnVector extends 
WritableColumnVectorShim {
 
     @Override
     final void setInt(int rowId, int value) {
-      writer.set(rowId, value);
+      writer.setSafe(rowId, value);
     }
 
     @Override


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

Reply via email to