File tree Expand file tree Collapse file tree
client/src/main/java/com/vesoft/nebula/driver/graph/decode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66package com .vesoft .nebula .driver .graph .decode ;
77
8- import com .google .common .base .Charsets ;
98import com .vesoft .nebula .driver .graph .data .ValueWrapper ;
109import com .vesoft .nebula .driver .graph .decode .datatype .DataType ;
1110import com .vesoft .nebula .driver .graph .decode .datatype .ValueTypeParser ;
1413import com .vesoft .nebula .proto .graph .VectorBatch ;
1514import com .vesoft .nebula .proto .graph .VectorResultTable ;
1615import java .nio .ByteOrder ;
17- import java .nio .charset .Charset ;
1816import java .util .ArrayList ;
1917import java .util .List ;
2018
@@ -118,14 +116,15 @@ public Row next() {
118116 currentBatchRowSize = currentBatch .getBatchRowSize ();
119117 }
120118 // the current batch is empty or already finished the batch, jump the batch
121- if (currentBatch .getVectorsCount () == 0 || currentBatchRowIndex >= currentBatchRowSize ) {
119+ while (currentBatch .getVectorsCount () == 0 || currentBatchRowIndex >= currentBatchRowSize ) {
122120 batchIndex ++;
123121 if (batchIndex >= numBatches ) {
124122 throw new RuntimeException ("no more batch data" );
125123 }
126124 // reset currentBatchRowIndex to 0
127125 currentBatchRowIndex = 0 ;
128126 currentBatch = new Batch (resultTable .getBatch (batchIndex ), byteOrder );
127+ currentBatchRowSize = currentBatch .getBatchRowSize ();
129128 }
130129
131130 // resolve the current batch
You can’t perform that action at this time.
0 commit comments