pub struct GFFConfig {
pub batch_size: usize,
pub file_schema: SchemaRef,
pub object_store: Arc<dyn ObjectStore>,
pub projection: Option<Vec<usize>>,
}Expand description
Configuration for a GFF data source.
Fields§
§batch_size: usizeThe number of rows to read at a time.
file_schema: SchemaRefThe schema of the GFF file. This is static.
object_store: Arc<dyn ObjectStore>The object store to use for reading GFF files.
projection: Option<Vec<usize>>Any projections to apply to the resulting batches.
Implementations§
Source§impl GFFConfig
impl GFFConfig
Sourcepub fn new(object_store: Arc<dyn ObjectStore>, file_schema: Arc<Schema>) -> Self
pub fn new(object_store: Arc<dyn ObjectStore>, file_schema: Arc<Schema>) -> Self
Create a new GFF configuration.
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set the batch size.
Sourcepub fn with_projection(self, projection: Vec<usize>) -> Self
pub fn with_projection(self, projection: Vec<usize>) -> Self
Set the projection.
Sourcepub fn projection(&self) -> Vec<usize>
pub fn projection(&self) -> Vec<usize>
Get the projection, returning the identity projection if none is set.
Sourcepub fn projected_schema(&self) -> Result<SchemaRef>
pub fn projected_schema(&self) -> Result<SchemaRef>
Get the projected schema.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GFFConfig
impl !RefUnwindSafe for GFFConfig
impl Send for GFFConfig
impl Sync for GFFConfig
impl Unpin for GFFConfig
impl !UnwindSafe for GFFConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more