diff --git a/paimon-arrow/src/main/java/org/apache/paimon/arrow/writer/ArrowFieldWriterFactoryVisitor.java b/paimon-arrow/src/main/java/org/apache/paimon/arrow/writer/ArrowFieldWriterFactoryVisitor.java index 9c1a55ec33ea..eef53009cec3 100644 --- a/paimon-arrow/src/main/java/org/apache/paimon/arrow/writer/ArrowFieldWriterFactoryVisitor.java +++ b/paimon-arrow/src/main/java/org/apache/paimon/arrow/writer/ArrowFieldWriterFactoryVisitor.java @@ -158,6 +158,7 @@ public ArrowFieldWriterFactory visit(MapType mapType) { ArrowFieldWriterFactory valueWriterFactory = mapType.getValueType().accept(this); return fieldVector -> { MapVector mapVector = (MapVector) fieldVector; + mapVector.reAlloc(); List keyValueVectors = mapVector.getDataVector().getChildrenFromFields(); return new ArrowFieldWriters.MapWriter( fieldVector,