Skip to content

Commit

Permalink
Implement RecordBatchReader for arrow_csv::reader::BufReader (#4195)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreyc authored May 10, 2023
1 parent b314118 commit adca63a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arrow-csv/src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,12 @@ impl<R: BufRead> Iterator for BufReader<R> {
}
}

impl<R: BufRead> RecordBatchReader for BufReader<R> {
fn schema(&self) -> SchemaRef {
self.decoder.schema.clone()
}
}

/// A push-based interface for decoding CSV data from an arbitrary byte stream
///
/// See [`Reader`] for a higher-level interface for interface with [`Read`]
Expand Down

0 comments on commit adca63a

Please sign in to comment.