This is an automated email from the ASF dual-hosted git repository.
junhao pushed a commit to branch release-1.1
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/release-1.1 by this push:
new 6443425ffa [arrow] Fix bug: field writer contruct in ArrowFormatWriter
should use nested field nullable to create sub writers
6443425ffa is described below
commit 6443425ffacef52206a09e120f3529368a8c09b3
Author: 仟弋 <[email protected]>
AuthorDate: Fri Apr 25 18:51:24 2025 +0800
[arrow] Fix bug: field writer contruct in ArrowFormatWriter should use
nested field nullable to create sub writers
---
.../java/org/apache/paimon/arrow/vector/ArrowFormatWriter.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
a/paimon-arrow/src/main/java/org/apache/paimon/arrow/vector/ArrowFormatWriter.java
b/paimon-arrow/src/main/java/org/apache/paimon/arrow/vector/ArrowFormatWriter.java
index 5bd19cfe42..a957fa2288 100644
---
a/paimon-arrow/src/main/java/org/apache/paimon/arrow/vector/ArrowFormatWriter.java
+++
b/paimon-arrow/src/main/java/org/apache/paimon/arrow/vector/ArrowFormatWriter.java
@@ -22,6 +22,7 @@ import org.apache.paimon.arrow.ArrowUtils;
import org.apache.paimon.arrow.writer.ArrowFieldWriter;
import org.apache.paimon.arrow.writer.ArrowFieldWriterFactoryVisitor;
import org.apache.paimon.data.InternalRow;
+import org.apache.paimon.types.DataType;
import org.apache.paimon.types.RowType;
import org.apache.arrow.memory.BufferAllocator;
@@ -57,12 +58,10 @@ public class ArrowFormatWriter implements AutoCloseable {
fieldWriters = new ArrowFieldWriter[rowType.getFieldCount()];
for (int i = 0; i < fieldWriters.length; i++) {
+ DataType type = rowType.getFields().get(i).type();
fieldWriters[i] =
- rowType.getFields()
- .get(i)
- .type()
- .accept(ArrowFieldWriterFactoryVisitor.INSTANCE)
- .create(vectorSchemaRoot.getVector(i),
rowType.isNullable());
+ type.accept(ArrowFieldWriterFactoryVisitor.INSTANCE)
+ .create(vectorSchemaRoot.getVector(i),
type.isNullable());
}
this.batchSize = writeBatchSize;