pub struct JsonOptions {
pub compression: CompressionTypeVariant,
pub compression_level: Option<u32>,
pub schema_infer_max_rec: Option<usize>,
pub newline_delimited: bool,
}Expand description
Options controlling JSON format
Fields§
§compression: CompressionTypeVariant§compression_level: Option<u32>Compression level for the output file. The valid range depends on the compression algorithm:
- ZSTD: 1 to 22 (default: 3)
- GZIP: 0 to 9 (default: 6)
- BZIP2: 0 to 9 (default: 6)
- XZ: 0 to 9 (default: 6) If not specified, the default level for the compression algorithm is used.
schema_infer_max_rec: Option<usize>§newline_delimited: boolThe JSON format to use when reading files.
When true (default), expects newline-delimited JSON (NDJSON):
{"key1": 1, "key2": "val"}
{"key1": 2, "key2": "vals"}When false, expects JSON array format:
[
{"key1": 1, "key2": "val"},
{"key1": 2, "key2": "vals"}
]Trait Implementations§
Source§impl Clone for JsonOptions
impl Clone for JsonOptions
Source§fn clone(&self) -> JsonOptions
fn clone(&self) -> JsonOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigField for JsonOptions
impl ConfigField for JsonOptions
Source§impl Debug for JsonOptions
impl Debug for JsonOptions
Source§impl Default for JsonOptions
impl Default for JsonOptions
Source§fn default() -> JsonOptions
fn default() -> JsonOptions
Returns the “default value” for a type. Read more
Source§impl From<&JsonOptions> for JsonOptions
impl From<&JsonOptions> for JsonOptions
Source§fn from(proto: &JsonOptions) -> JsonOptions
fn from(proto: &JsonOptions) -> JsonOptions
Converts to this type from the input type.
Source§impl PartialEq for JsonOptions
impl PartialEq for JsonOptions
Source§fn eq(&self, other: &JsonOptions) -> bool
fn eq(&self, other: &JsonOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JsonOptions
Source§impl TryFrom<&JsonOptions> for JsonWriterOptions
impl TryFrom<&JsonOptions> for JsonWriterOptions
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(value: &JsonOptions) -> Result<JsonWriterOptions, DataFusionError>
fn try_from(value: &JsonOptions) -> Result<JsonWriterOptions, DataFusionError>
Performs the conversion.
Source§impl TryFrom<&JsonOptions> for JsonOptions
impl TryFrom<&JsonOptions> for JsonOptions
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(
proto_opts: &JsonOptions,
) -> Result<JsonOptions, <JsonOptions as TryFrom<&JsonOptions>>::Error>
fn try_from( proto_opts: &JsonOptions, ) -> Result<JsonOptions, <JsonOptions as TryFrom<&JsonOptions>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for JsonOptions
impl RefUnwindSafe for JsonOptions
impl Send for JsonOptions
impl Sync for JsonOptions
impl Unpin for JsonOptions
impl UnsafeUnpin for JsonOptions
impl UnwindSafe for JsonOptions
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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