private BinaryTableReader(IStreamProvider streamProvider, string tableRootPath) { TablePath = tableRootPath; _metadata = TableMetadataSerializer.Read(streamProvider, tableRootPath); // Construct columns (files aren't opened until columns are subscribed to) _columns = new BinaryReaderColumn[_metadata.Schema.Count]; for (int i = 0; i < _columns.Length; ++i) { _columns[i] = new BinaryReaderColumn(this, _metadata.Schema[i], streamProvider); } Reset(); }
public static IXTable Build(IStreamProvider streamProvider, string tableRootPath) { TableMetadata metadata = TableMetadataSerializer.Read(streamProvider, tableRootPath); if (metadata.Partitions.Count > 0) { // If this table has partitions, load the parts (*allowing* recursive partitioning) // This allows partitioning by a column where one column value still will hit the size limit. return(ConcatenatedTable.Build(metadata.Partitions.Select((partition) => BinaryTableReader.Build(streamProvider, Path.Combine(tableRootPath, partition))))); } else { return(new BinaryTableReader(streamProvider, tableRootPath)); } }