Skip to content

DataRecordCollection

A DataRecordCollection contains a list of DataRecords.

This is a wrapper class for list[DataRecord] to support more advanced features for output of execute().

The difference between DataRecordSet and DataRecordCollection

Goal

DataRecordSet is a set of DataRecords that share the same schema, same parent_id, and same source_idx. DataRecordCollection is a general wrapper for list[DataRecord].

Usage

DataRecordSet is used for the output of executing an operator. DataRecordCollection is used for the output of executing a query, we definitely could extend it to support more advanced features for output of execute().

__iter__

__iter__() -> Generator[DataRecord]

Allow iterating directly over the data records

__len__

__len__()

Return the number of records in the collection