Struct lance_file::v2::writer::FileWriter
source · pub struct FileWriter { /* private fields */ }Implementations§
source§impl FileWriter
impl FileWriter
sourcepub fn try_new(
object_writer: ObjectWriter,
path: String,
schema: LanceSchema,
options: FileWriterOptions
) -> Result<Self>
pub fn try_new( object_writer: ObjectWriter, path: String, schema: LanceSchema, options: FileWriterOptions ) -> Result<Self>
Create a new FileWriter
sourcepub async fn write_batch(&mut self, batch: &RecordBatch) -> Result<()>
pub async fn write_batch(&mut self, batch: &RecordBatch) -> Result<()>
Schedule a batch of data to be written to the file
Note: the future returned by this method may complete before the data has been fully flushed to the file (some data may be in the data cache or the I/O cache)
sourcepub async fn finish(&mut self) -> Result<u64>
pub async fn finish(&mut self) -> Result<u64>
Finishes writing the file
This method will wait until all data has been flushed to the file. Then it will write the file metadata and the footer. It will not return until all data has been flushed and the file has been closed.
Returns the total number of rows written
pub fn multipart_id(&self) -> &str
pub async fn tell(&mut self) -> Result<u64>
pub fn field_id_to_column_indices(&self) -> &[(i32, i32)]
pub fn path(&self) -> &str
Auto Trait Implementations§
impl Freeze for FileWriter
impl !RefUnwindSafe for FileWriter
impl Send for FileWriter
impl !Sync for FileWriter
impl Unpin for FileWriter
impl !UnwindSafe for FileWriter
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