Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.vesoft.nebula.driver.graph.decode;

import com.google.common.base.Charsets;
import com.vesoft.nebula.driver.graph.data.ValueWrapper;
import com.vesoft.nebula.driver.graph.decode.datatype.DataType;
import com.vesoft.nebula.driver.graph.decode.datatype.ValueTypeParser;
Expand All @@ -14,7 +13,6 @@
import com.vesoft.nebula.proto.graph.VectorBatch;
import com.vesoft.nebula.proto.graph.VectorResultTable;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -118,14 +116,15 @@ public Row next() {
currentBatchRowSize = currentBatch.getBatchRowSize();
}
// the current batch is empty or already finished the batch, jump the batch
if (currentBatch.getVectorsCount() == 0 || currentBatchRowIndex >= currentBatchRowSize) {
while (currentBatch.getVectorsCount() == 0 || currentBatchRowIndex >= currentBatchRowSize) {
batchIndex++;
if (batchIndex >= numBatches) {
throw new RuntimeException("no more batch data");
}
// reset currentBatchRowIndex to 0
currentBatchRowIndex = 0;
currentBatch = new Batch(resultTable.getBatch(batchIndex), byteOrder);
currentBatchRowSize = currentBatch.getBatchRowSize();
}

// resolve the current batch
Expand Down
Loading