pub struct SDFConfig {
pub batch_size: usize,
pub file_schema: SchemaRef,
pub object_store: Arc<dyn ObjectStore>,
pub projection: Option<Vec<usize>>,
pub limit: Option<usize>,
}Expand description
Configuration for a SDF data source.
Fields§
§batch_size: usizeThe number of rows to read at a time.
file_schema: SchemaRefThe schema of the file.
object_store: Arc<dyn ObjectStore>The object store to use.
projection: Option<Vec<usize>>Any projections to apply to the resulting batches.
limit: Option<usize>The limit of rows to read.
Implementations§
Source§impl SDFConfig
impl SDFConfig
pub fn new( object_store: Arc<dyn ObjectStore>, batch_size: usize, file_schema: SchemaRef, ) -> Self
Sourcepub fn effective_batch_size(&self) -> usize
pub fn effective_batch_size(&self) -> usize
Get the effective batch size, which is the minimum of the batch size and the limit.
Sourcepub fn with_limit_opt(self, limit: Option<usize>) -> Self
pub fn with_limit_opt(self, limit: Option<usize>) -> Self
Set the limit.
Sourcepub fn projection(&self) -> Vec<usize>
pub fn projection(&self) -> Vec<usize>
Get the projection.
Sourcepub fn projected_schema(&self) -> Result<SchemaRef>
pub fn projected_schema(&self) -> Result<SchemaRef>
Get the projected schema.
Sourcepub fn with_projection(self, projection: Vec<usize>) -> Self
pub fn with_projection(self, projection: Vec<usize>) -> Self
Create a new SDF configuration with a given projection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SDFConfig
impl !RefUnwindSafe for SDFConfig
impl Send for SDFConfig
impl Sync for SDFConfig
impl Unpin for SDFConfig
impl !UnwindSafe for SDFConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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