Skip to content

Commit b3392fd

Browse files
author
mrrtree
authored
fix: multi arrow batch (#59)
1 parent 1d70911 commit b3392fd

File tree

1 file changed

+4
-2
lines changed
  • ceresdb-protocol/src/main/java/io/ceresdb/util

1 file changed

+4
-2
lines changed

ceresdb-protocol/src/main/java/io/ceresdb/util/Utils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.Collection;
1313
import java.util.Collections;
1414
import java.util.Iterator;
15+
import java.util.LinkedList;
1516
import java.util.List;
1617
import java.util.Map;
1718
import java.util.Properties;
@@ -455,10 +456,11 @@ private static List<Row> parseArrowBatch(ByteString batch, Storage.ArrowPayload.
455456
VectorSchemaRoot readRoot = arrowStreamReader.getVectorSchemaRoot();
456457
Schema schema = readRoot.getSchema();
457458

459+
List<Row> batchRows = new LinkedList<>();
458460
while (arrowStreamReader.loadNextBatch()) {
459-
return parseArrowRecord(schema, readRoot);
461+
batchRows.addAll(parseArrowRecord(schema, readRoot));
460462
}
461-
return Collections.EMPTY_LIST;
463+
return batchRows;
462464
} catch (IOException e) {
463465
return Collections.EMPTY_LIST;
464466
}

0 commit comments

Comments
 (0)