From 2b3e2b70571d68cf359b779f442a4ee33c819d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=9F=E5=BC=8B?= Date: Fri, 18 Oct 2024 14:40:46 +0800 Subject: [PATCH] [arrow] Allocate buffer for MapVector in init --- .../paimon/arrow/writer/ArrowFieldWriterFactoryVisitor.java | 1 + 1 file changed, 1 insertion(+) 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,