From cf87633a799907741b0d57b003642cc9bf2707e9 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 28 Oct 2024 15:16:47 +0800 Subject: [PATCH] chore: Expose StripeFactory so users can write them in struct (#9) Signed-off-by: Xuanwo --- src/async_arrow_reader.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/async_arrow_reader.rs b/src/async_arrow_reader.rs index 94a0565..851a228 100644 --- a/src/async_arrow_reader.rs +++ b/src/async_arrow_reader.rs @@ -68,7 +68,7 @@ impl From> for StripeFactory { } } -struct StripeFactory { +pub struct StripeFactory { inner: Cursor, is_end: bool, } @@ -132,6 +132,11 @@ impl ArrowStreamReader { } } + /// Extracts the inner `StripeFactory` and `SchemaRef` from the `ArrowStreamReader`. + pub fn into_parts(self) -> (Option>>, SchemaRef) { + (self.factory, self.schema_ref) + } + pub fn schema(&self) -> SchemaRef { self.schema_ref.clone() }