pub enum FileWriter {
V2_0(Box<Writer>),
V2_1(Box<Writer>),
V2_2(Box<Writer>),
V2_3(Box<Writer>),
}Expand description
A type-erased current-format file writer.
This enum exists for callers that select a concrete file version at runtime. Each variant owns the complete implementation for exactly one file grammar; this type only forwards operations without adding format policy.
Variants§
Implementations§
Source§impl FileWriter
impl FileWriter
Sourcepub fn with_page_metadata_spill(
self,
object_store: Arc<ObjectStore>,
path: Path,
) -> Self
pub fn with_page_metadata_spill( self, object_store: Arc<ObjectStore>, path: Path, ) -> Self
Spill page metadata to a sidecar file.
Sourcepub async fn write_batches(
&mut self,
batches: impl Iterator<Item = &RecordBatch>,
) -> Result<()>
pub async fn write_batches( &mut self, batches: impl Iterator<Item = &RecordBatch>, ) -> Result<()>
Schedule batches of data to be written to the file.
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.
Sourcepub async fn write_column(
&mut self,
column_index: usize,
array: ArrayRef,
) -> Result<()>
pub async fn write_column( &mut self, column_index: usize, array: ArrayRef, ) -> Result<()>
Write one top-level column.
Sourcepub async fn write_external_buffer(
&mut self,
bytes: &[u8],
) -> Result<(u64, u64)>
pub async fn write_external_buffer( &mut self, bytes: &[u8], ) -> Result<(u64, u64)>
Append a buffer whose page or column metadata is supplied externally.
Sourcepub fn add_schema_metadata(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
)
pub fn add_schema_metadata( &mut self, key: impl Into<String>, value: impl Into<String>, )
Add a metadata entry to the schema.
Sourcepub fn initialize_with_external_columns(
&mut self,
schema: Schema,
columns: &[Arc<ColumnInfo>],
rows_written: u64,
) -> Result<()>
pub fn initialize_with_external_columns( &mut self, schema: Schema, columns: &[Arc<ColumnInfo>], rows_written: u64, ) -> Result<()>
Prepare a writer from encoded columns whose buffers were produced externally.
Sourcepub async fn add_global_buffer(&mut self, buffer: Bytes) -> Result<u32>
pub async fn add_global_buffer(&mut self, buffer: Bytes) -> Result<u32>
Add an arbitrary global buffer and return its one-based index.
Sourcepub async fn finish(&mut self) -> Result<FileWriteSummary>
pub async fn finish(&mut self) -> Result<FileWriteSummary>
Finish the file and close its object writer.
Sourcepub fn field_id_to_column_indices(&self) -> &[(u32, u32)]
pub fn field_id_to_column_indices(&self) -> &[(u32, u32)]
Return the field-id to physical-column mapping.
Trait Implementations§
Source§impl From<Writer> for FileWriter
impl From<Writer> for FileWriter
Source§impl From<Writer> for FileWriter
impl From<Writer> for FileWriter
Source§impl From<Writer> for FileWriter
impl From<Writer> for FileWriter
Auto Trait Implementations§
impl !RefUnwindSafe for FileWriter
impl !Sync for FileWriter
impl !UnwindSafe for FileWriter
impl Freeze for FileWriter
impl Send for FileWriter
impl Unpin for FileWriter
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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