pub struct JsonOpener { /* private fields */ }Expand description
A FileOpener that opens a JSON file and yields a FileOpenFuture
Implementations§
Source§impl JsonOpener
impl JsonOpener
Sourcepub fn new(
batch_size: usize,
projected_schema: SchemaRef,
file_compression_type: FileCompressionType,
object_store: Arc<dyn ObjectStore>,
) -> Self
pub fn new( batch_size: usize, projected_schema: SchemaRef, file_compression_type: FileCompressionType, object_store: Arc<dyn ObjectStore>, ) -> Self
Returns a JsonOpener
Trait Implementations§
Source§impl FileOpener for JsonOpener
impl FileOpener for JsonOpener
Source§fn open(&self, partitioned_file: PartitionedFile) -> Result<FileOpenFuture>
fn open(&self, partitioned_file: PartitionedFile) -> Result<FileOpenFuture>
Open a partitioned NDJSON file.
If file_meta.range is None, the entire file is opened.
Else file_meta.range is Some(FileRange{start, end}), which corresponds to the byte range [start, end) within the file.
Note: start or end might be in the middle of some lines. In such cases, the following rules
are applied to determine which lines to read:
- The first line of the partition is the line in which the index of the first character >=
start. - The last line of the partition is the line in which the byte at position
end - 1resides.
Auto Trait Implementations§
impl Freeze for JsonOpener
impl !RefUnwindSafe for JsonOpener
impl Send for JsonOpener
impl Sync for JsonOpener
impl Unpin for JsonOpener
impl UnsafeUnpin for JsonOpener
impl !UnwindSafe for JsonOpener
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> 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