Asks the streamer to collect the rows into a list of DataObjects.
184571
public <T extends DataObject> List<T> collect(Class<T> type) {
        return collect(type, null);
    }
1359499
private int getTupleDataRowCount(List<DBBPool.BBContainer> outputBuffers) {
        if (outputBuffers == null || outputBuffers.size() != m_tableTasks.size()) return 0;
        int accumulator = 0;
        for (int i = 0; i < outputBuffers.size(); ++i) {
            SnapshotDataTarget target = m_tableTasks.get(i).m_target;
            int rowCount = target.getInContainerRowCount(outputBuffers.get(i));
            if (rowCount != SnapshotDataTarget.ROW_COUNT_UNSUPPORTED) {
                accumulator += target.getInContainerRowCount(outputBuffers.get(i));
            }
        }
        return accumulator;
    }
1374008
def as_stream(self):
        

        if not self.singular:
            raise ArgumentError("Attempted to convert a non-singular selector to a data stream, it matches multiple", selector=self)

        return DataStream(self.match_type, self.match_id, self.match_spec == DataStreamSelector.MatchSystemOnly)
684762
async def post_list(cls, sender, db, instances):
        '''
        
        '''
        serialized_objects = await asyncio.gather(*[obj.serialize() for obj in instances])
        await cls.emit(db, 'resource_get_list', serialized_objects)
515173
def streams(self):
        
        from pyspark.sql.streaming import StreamingQueryManager
        return StreamingQueryManager(self._jsparkSession.streams())
82510
function collect(stream, encoding, cb = () => {}) {
  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  return stream
    .pipe(new Collect({ encoding, objectMode: stream._readableState.objectMode }))
    .collect()
    .then((data) => {
      cb(null, data);
      return data;
    })
    .catch((e) => {
      cb(e);
      throw e;
    });
}
162070
private static function buildRows(array $data): StreamInterface
    {
        $rows = new Stream(Row::class);
        $responses = $data['data'] ?? [];

        foreach ($responses as $response) {
            foreach ($response['row'] as $idx => $row) {
                $rows = $rows->add(new Row\Row(
                    $data['columns'][$idx],
                    $row
                ));
            }
        }

        return $rows;
    }
136034
private ArrayList<HashMap> getDataList(Map expData, String blockName, String dataListName) {
        HashMap dataBlock = getObjectOr(expData, blockName, new HashMap());
        return getObjectOr(dataBlock, dataListName, new ArrayList<HashMap>());
    }
1270642
public <T extends DataObject> List<T> collect(Class<T> type, Callable<T> factory) {
        Generator<T> generator = new Generator<T>(type, factory);
        _generator = generator;
        return generator.list;
    }
21327
def collect_rows &block
      return to_enum(:collect_rows) unless block_given?

      Daru::Vector.new(each_row.map(&block), index: @index)
    end
594673
def dataset_to_stream(dataset, input_name, num_chunks=0, append_targets=False):
  """"""
  for example in tfds.as_numpy(dataset):
    inp, out = example[0][input_name], example[1]
    if len(out.shape) > 1 and out.shape[-1] == 1:
      out = np.squeeze(out, axis=-1)
    if num_chunks > 0:
      inp = np.split(inp, num_chunks, axis=1)
      out = np.split(out, num_chunks, axis=1)
    if append_targets:
      inp = (inp, out)
    yield inp, out
321486
function onResultStreamData(chunk)
  {
    // unsubscribe from the result stream's 'data' and 'close' events
    resultStream.removeListener('data', onResultStreamData);
    resultStream.removeListener('close', onResultStreamClose);

    // get all the rows in the chunk that overlap with the requested window,
    // and use the resulting array as the new row buffer
    var chunkStart = chunk.getStartIndex();
    var chunkEnd = chunk.getEndIndex();
    rowBuffer = chunk.getRows().slice(
        Math.max(chunkStart, start) - chunkStart,
        Math.min(chunkEnd, end) + 1 - chunkStart);

    // reset the row index
    rowIndex = 0;

    // process the row buffer
    processRowBuffer();
  }
1215646
public List getDataList(DataSource ds, String key, String sql, int start, int count) throws
     Exception {
   Connection c = null;
   Statement stmt = null;
   ResultSet rs = null;
   List items = new ArrayList(count);
   try {
     c = ds.getConnection();
     stmt = c.createStatement();

     DbUtil.testConnection(c);
     if (DbUtil.supportsMaxRows)
       stmt.setMaxRows(count + start + 1);
     rs = stmt.executeQuery(sql);
     if (DbUtil.supportsFetchSize)
       rs.setFetchSize(count);
     if (start >= 0 && rs.absolute(start + 1)) {

       do {
         items.add(rs.getString(1));
       }
       while ( (rs.next()) && (--count > 0));

     }

   } catch (SQLException se) {
     throw new Exception("SQLException: " + se.getMessage());
   } finally {
     if (rs != null)
       rs.close();
     if (stmt != null)
       stmt.close();
     if (c != null)
       c.close();
   }
    return items;
 }
569633
def load_stream(self, stream):
        
        batches = super(ArrowStreamPandasSerializer, self).load_stream(stream)
        import pyarrow as pa
        for batch in batches:
            yield [self.arrow_to_pandas(c) for c in pa.Table.from_batches([batch]).itercolumns()]
26661
def load(self):
    
    print "Loading data for %s..." % self.getName()
    self._dataHandle = self._stream.data(
      since=self._since, until=self._until, 
      limit=self._limit, aggregate=self._aggregate
    )
    self._data = self._dataHandle.data()
    self._headers = self._dataHandle.headers()
    print "Loaded %i rows." % len(self)
926747
def _dyn_rows(response)
      rows = []
      response.elements.each('DynTable/Data/tr') do |row|
        rows << _dyn_record(row)
      end
      rows
    end
375239
public static Object[] tableRowAsObjects(VoltTableRow row) {
        Object[] result = new Object[row.getColumnCount()];
        for (int i = 0; i < row.getColumnCount(); i++) {
            result[i] = row.get(i, row.getColumnType(i));
        }
        return result;
    }