This is an automated email from the ASF dual-hosted git repository.
junhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new ab30ca8629 [arrow] [bug] Fix bug: field writer constructor in
ArrowFormatWriter should use nested field nullable parameter to create sub
writers (#5538)
ab30ca8629 is described below
commit ab30ca862909ef528bad9ecb22cb71059d20ea4c
Author: YeJunHao <[email protected]>
AuthorDate: Fri Apr 25 19:38:15 2025 +0800
[arrow] [bug] Fix bug: field writer constructor in ArrowFormatWriter should
use nested field nullable parameter to create sub writers (#5538)
---
.../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;