Skip to content

Commit

Permalink
chore: Expose StripeFactory so users can write them in struct (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Oct 28, 2024
1 parent 92b6333 commit cf87633
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/async_arrow_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<R: Send> From<Cursor<R>> for StripeFactory<R> {
}
}

struct StripeFactory<R> {
pub struct StripeFactory<R> {
inner: Cursor<R>,
is_end: bool,
}
Expand Down Expand Up @@ -132,6 +132,11 @@ impl<R: AsyncChunkReader + 'static> ArrowStreamReader<R> {
}
}

/// Extracts the inner `StripeFactory` and `SchemaRef` from the `ArrowStreamReader`.
pub fn into_parts(self) -> (Option<Box<StripeFactory<R>>>, SchemaRef) {
(self.factory, self.schema_ref)
}

pub fn schema(&self) -> SchemaRef {
self.schema_ref.clone()
}
Expand Down

0 comments on commit cf87633

Please sign in to comment.