Skip to content
Draft
12 changes: 6 additions & 6 deletions crates/iceberg/src/arrow/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl ArrowReader {
data_file_path: &str,
file_io: FileIO,
should_load_page_index: bool,
) -> Result<ParquetRecordBatchStreamBuilder<ArrowFileReader<impl FileRead + Sized>>> {
) -> Result<ParquetRecordBatchStreamBuilder<ArrowFileReader>> {
// Get the metadata for the Parquet file we need to read and build
// a reader for the data within
let parquet_file = file_io.new_input(data_file_path)?;
Expand Down Expand Up @@ -1312,18 +1312,18 @@ impl BoundPredicateVisitor for PredicateConverter<'_> {
}

/// ArrowFileReader is a wrapper around a FileRead that impls parquets AsyncFileReader.
pub struct ArrowFileReader<R: FileRead> {
pub struct ArrowFileReader {
meta: FileMetadata,
preload_column_index: bool,
preload_offset_index: bool,
preload_page_index: bool,
metadata_size_hint: Option<usize>,
r: R,
r: Box<dyn FileRead>,
}

impl<R: FileRead> ArrowFileReader<R> {
impl ArrowFileReader {
/// Create a new ArrowFileReader
pub fn new(meta: FileMetadata, r: R) -> Self {
pub fn new(meta: FileMetadata, r: Box<dyn FileRead>) -> Self {
Self {
meta,
preload_column_index: false,
Expand Down Expand Up @@ -1362,7 +1362,7 @@ impl<R: FileRead> ArrowFileReader<R> {
}
}

impl<R: FileRead> AsyncFileReader for ArrowFileReader<R> {
impl AsyncFileReader for ArrowFileReader {
fn get_bytes(&mut self, range: Range<u64>) -> BoxFuture<'_, parquet::errors::Result<Bytes>> {
Box::pin(
self.r
Expand Down
Loading
Loading