diff --git a/src/io/ipc/read/reader.rs b/src/io/ipc/read/reader.rs index 26203aff7c7..212006f155a 100644 --- a/src/io/ipc/read/reader.rs +++ b/src/io/ipc/read/reader.rs @@ -25,7 +25,7 @@ use arrow_format::ipc::flatbuffers::VerifierOptions; use crate::array::*; use crate::datatypes::Schema; use crate::error::{ArrowError, Result}; -use crate::record_batch::{RecordBatch, RecordBatchReader}; +use crate::record_batch::RecordBatch; use super::super::convert; use super::super::{ARROW_MAGIC, CONTINUATION_MARKER}; @@ -318,9 +318,3 @@ impl Iterator for FileReader { } } } - -impl RecordBatchReader for FileReader { - fn schema(&self) -> &Schema { - self.schema().as_ref() - } -} diff --git a/src/record_batch.rs b/src/record_batch.rs index 02182af41df..05457f253d2 100644 --- a/src/record_batch.rs +++ b/src/record_batch.rs @@ -332,21 +332,3 @@ impl From for StructArray { StructArray::from_data(DataType::Struct(fields), values, None) } } - -/// Trait for types that can read `RecordBatch`'s. -pub trait RecordBatchReader: Iterator> { - /// Returns the schema of this `RecordBatchReader`. - /// - /// Implementation of this trait should guarantee that all `RecordBatch`'s returned by this - /// reader should have the same schema as returned from this method. - fn schema(&self) -> &Schema; - - /// Reads the next `RecordBatch`. - #[deprecated( - since = "2.0.0", - note = "This method is deprecated in favour of `next` from the trait Iterator." - )] - fn next_batch(&mut self) -> Result> { - self.next().transpose() - } -}