Skip to content

DataChunks Iterator

Guodong Jin edited this page Mar 22, 2021 · 2 revisions

The Iterator allows iteration over all tuples in a DataChunks one tuple at a time. A Tuple is basically a vector of Literal with a utility function toString().

Usage example:

 vector<DataType> vectorTypes;
 ...
 Tuple tuple(vectorTypes);
 DataChunksIterator dataChunksIterator(dataChunks);
 while (dataChunksIterator.hasNextTuple()) {
     dataChunksIterator.getNextTuple(tuple);
     cout << tuple.ToString() << endl;
 }
 ...
 dataChunksIterator.setDataChunks(newDataChunks);
 ...
Clone this wiki locally