parquet/record/record_reader.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for additional information regarding copyright ownership
3// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements
4
5use super::super::errors::ParquetError;
6use super::super::file::reader::RowGroupReader;
7
8/// Read up to `num_records` records from `row_group_reader` into `self`.
9///
10/// The type parameter `T` is used to work around the rust orphan rule
11/// when implementing on types such as `Vec<T>`.
12pub trait RecordReader<T> {
13 /// Read up to `num_records` records from `row_group_reader` into `self`.
14 fn read_from_row_group(
15 &mut self,
16 row_group_reader: &mut dyn RowGroupReader,
17 num_records: usize,
18 ) -> Result<(), ParquetError>;
19}