pub struct Manifest {Show 19 fields
pub schema: Schema,
pub version: u64,
pub branch: Option<String>,
pub writer_version: Option<WriterVersion>,
pub fragments: Arc<Vec<Fragment>>,
pub version_aux_data: usize,
pub index_section: Option<usize>,
pub timestamp_nanos: u128,
pub tag: Option<String>,
pub reader_feature_flags: u64,
pub writer_feature_flags: u64,
pub max_fragment_id: Option<u32>,
pub transaction_file: Option<String>,
pub transaction_section: Option<usize>,
pub next_row_id: u64,
pub data_storage_format: DataStorageFormat,
pub config: HashMap<String, String>,
pub table_metadata: HashMap<String, String>,
pub base_paths: HashMap<u32, BasePath>,
/* private fields */
}Expand description
Manifest of a dataset
- Schema
- Version
- Fragments.
- Indices.
Fields§
§schema: SchemaDataset schema.
version: u64Dataset version
branch: Option<String>Branch name, None if the dataset is the main branch.
writer_version: Option<WriterVersion>Version of the writer library that wrote this manifest.
fragments: Arc<Vec<Fragment>>Fragments, the pieces to build the dataset.
This list is stored in order, sorted by fragment id. However, the fragment id sequence may have gaps.
version_aux_data: usizeThe file position of the version aux data.
index_section: Option<usize>The file position of the index metadata.
timestamp_nanos: u128The creation timestamp with nanosecond resolution as 128-bit integer
tag: Option<String>An optional string tag for this version
reader_feature_flags: u64The reader flags
writer_feature_flags: u64The writer flags
max_fragment_id: Option<u32>The max fragment id used so far None means never set, Some(0) means max ID used so far is 0
transaction_file: Option<String>The path to the transaction file, relative to the root of the dataset
transaction_section: Option<usize>The file position of the inline transaction content inside the manifest
next_row_id: u64The max row id used so far.
data_storage_format: DataStorageFormatThe storage format of the data files.
config: HashMap<String, String>Table configuration.
table_metadata: HashMap<String, String>Table metadata.
This is a key-value map that can be used to store arbitrary metadata associated with the table. This is different than configuration, which is used to tell libraries how to read, write, or manage the table.
base_paths: HashMap<u32, BasePath>Implementations§
Source§impl Manifest
impl Manifest
pub fn new( schema: Schema, fragments: Arc<Vec<Fragment>>, data_storage_format: DataStorageFormat, base_paths: HashMap<u32, BasePath>, ) -> Self
pub fn new_from_previous( previous: &Self, schema: Schema, fragments: Arc<Vec<Fragment>>, ) -> Self
Sourcepub fn shallow_clone(
&self,
ref_name: Option<String>,
ref_path: String,
ref_base_id: u32,
branch_name: Option<String>,
transaction_file: String,
) -> Self
pub fn shallow_clone( &self, ref_name: Option<String>, ref_path: String, ref_base_id: u32, branch_name: Option<String>, transaction_file: String, ) -> Self
Performs a shallow_clone of the manifest entirely in memory without:
- Any persistent storage operations
- Modifications to the original data
- If the shallow clone is for branch, ref_name is the source branch
Sourcepub fn set_timestamp(&mut self, nanos: u128)
pub fn set_timestamp(&mut self, nanos: u128)
Set the timestamp_nanos value from a Utc DateTime
Sourcepub fn config_mut(&mut self) -> &mut HashMap<String, String>
pub fn config_mut(&mut self) -> &mut HashMap<String, String>
Get a mutable reference to the config
Sourcepub fn table_metadata_mut(&mut self) -> &mut HashMap<String, String>
pub fn table_metadata_mut(&mut self) -> &mut HashMap<String, String>
Get a mutable reference to the table metadata
Sourcepub fn schema_metadata_mut(&mut self) -> &mut HashMap<String, String>
pub fn schema_metadata_mut(&mut self) -> &mut HashMap<String, String>
Get a mutable reference to the schema metadata
Sourcepub fn field_metadata_mut(
&mut self,
field_id: i32,
) -> Option<&mut HashMap<String, String>>
pub fn field_metadata_mut( &mut self, field_id: i32, ) -> Option<&mut HashMap<String, String>>
Get a mutable reference to the field metadata for a specific field id
Returns None if the field does not exist in the schema.
Sourcepub fn update_config(
&mut self,
upsert_values: impl IntoIterator<Item = (String, String)>,
)
👎Deprecated: Use config_mut() for direct access to config HashMap
pub fn update_config( &mut self, upsert_values: impl IntoIterator<Item = (String, String)>, )
Set the config from an iterator
Sourcepub fn delete_config_keys(&mut self, delete_keys: &[&str])
👎Deprecated: Use config_mut() for direct access to config HashMap
pub fn delete_config_keys(&mut self, delete_keys: &[&str])
Delete config keys using a slice of keys
Sourcepub fn replace_schema_metadata(&mut self, new_metadata: HashMap<String, String>)
👎Deprecated: Use schema_metadata_mut() for direct access to schema metadata HashMap
pub fn replace_schema_metadata(&mut self, new_metadata: HashMap<String, String>)
Replaces the schema metadata with the given key-value pairs.
Sourcepub fn replace_field_metadata(
&mut self,
field_id: i32,
new_metadata: HashMap<String, String>,
) -> Result<()>
👎Deprecated: Use field_metadata_mut(field_id) for direct access to field metadata HashMap
pub fn replace_field_metadata( &mut self, field_id: i32, new_metadata: HashMap<String, String>, ) -> Result<()>
Replaces the metadata of the field with the given id with the given key-value pairs.
If the field does not exist in the schema, this is a no-op.
Sourcepub fn update_max_fragment_id(&mut self)
pub fn update_max_fragment_id(&mut self)
Check the current fragment list and update the high water mark
Sourcepub fn max_fragment_id(&self) -> Option<u64>
pub fn max_fragment_id(&self) -> Option<u64>
Return the max fragment id. Note this does not support recycling of fragment ids.
This will return None if there are no fragments and max_fragment_id was never set.
Sourcepub fn max_field_id(&self) -> i32
pub fn max_field_id(&self) -> i32
Get the max used field id
This is different than Schema::max_field_id because it also considers the field ids in the data files that have been dropped from the schema.
Sourcepub fn fragments_since(&self, since: &Self) -> Result<Vec<Fragment>>
pub fn fragments_since(&self, since: &Self) -> Result<Vec<Fragment>>
Return the fragments that are newer than the given manifest. Note this does not support recycling of fragment ids.
Sourcepub fn uses_stable_row_ids(&self) -> bool
pub fn uses_stable_row_ids(&self) -> bool
Whether the dataset uses stable row ids.
Sourcepub fn serialized(&self) -> Vec<u8> ⓘ
pub fn serialized(&self) -> Vec<u8> ⓘ
Creates a serialized copy of the manifest, suitable for IPC or temp storage and can be used to create a dataset
pub fn should_use_legacy_format(&self) -> bool
Sourcepub fn summary(&self) -> ManifestSummary
pub fn summary(&self) -> ManifestSummary
Get the summary information of a manifest.
This function calculates various statistics about the manifest, including:
- total_files_size: Total size of all data files in bytes
- total_fragments: Total number of fragments in the dataset
- total_data_files: Total number of data files across all fragments
- total_deletion_files: Total number of deletion files
- total_data_file_rows: Total number of rows in data files
- total_deletion_file_rows: Total number of deleted rows in deletion files
- total_rows: Total number of rows in the dataset
Trait Implementations§
Source§impl DeepSizeOf for Manifest
impl DeepSizeOf for Manifest
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl !RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl !UnwindSafe for Manifest
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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