pub struct ReaderBuilder { /* private fields */ }
Expand description

A builder for Reader and Decoder

Implementations§

source§

impl ReaderBuilder

source

pub fn new(schema: SchemaRef) -> Self

Create a new ReaderBuilder with the provided SchemaRef

This could be obtained using infer_json_schema if not known

Any columns not present in schema will be ignored, unless strict_mode is set to true. In this case, an error is returned when a column is missing from schema.

source

pub fn with_batch_size(self, batch_size: usize) -> Self

Sets the batch size in rows to read

source

pub fn coerce_primitive(self, coerce_primitive: bool) -> Self

👎Deprecated: Use with_coerce_primitive

Sets if the decoder should coerce primitive values (bool and number) into string when the Schema’s column is Utf8 or LargeUtf8.

source

pub fn with_coerce_primitive(self, coerce_primitive: bool) -> Self

Sets if the decoder should coerce primitive values (bool and number) into string when the Schema’s column is Utf8 or LargeUtf8.

source

pub fn with_strict_mode(self, strict_mode: bool) -> Self

Sets if the decoder should return an error if it encounters a column not present in schema

source

pub fn build<R: BufRead>(self, reader: R) -> Result<Reader<R>, ArrowError>

Create a Reader with the provided BufRead

source

pub fn build_decoder(self) -> Result<Decoder, ArrowError>

Create a Decoder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Allocation for Twhere T: RefUnwindSafe + Send + Sync,