Struct arrow_json::reader::ReaderBuilder
source · pub struct ReaderBuilder { /* private fields */ }
Implementations§
source§impl ReaderBuilder
impl ReaderBuilder
sourcepub fn new(schema: SchemaRef) -> Self
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
.
sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Sets the batch size in rows to read
sourcepub fn coerce_primitive(self, coerce_primitive: bool) -> Self
👎Deprecated: Use with_coerce_primitive
pub fn 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.
sourcepub fn with_coerce_primitive(self, coerce_primitive: bool) -> Self
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.
sourcepub fn with_strict_mode(self, strict_mode: bool) -> Self
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
sourcepub fn build_decoder(self) -> Result<Decoder, ArrowError>
pub fn build_decoder(self) -> Result<Decoder, ArrowError>
Create a Decoder
Auto Trait Implementations§
impl RefUnwindSafe for ReaderBuilder
impl Send for ReaderBuilder
impl Sync for ReaderBuilder
impl Unpin for ReaderBuilder
impl UnwindSafe for ReaderBuilder
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