pub struct DataFile {Show 17 fields
pub file_path: String,
pub file_format: FileFormat,
pub content: FileContent,
pub partition: HashMap<String, Value>,
pub record_count: i64,
pub file_size_in_bytes: i64,
pub column_sizes: HashMap<i32, i64>,
pub value_counts: HashMap<i32, i64>,
pub null_value_counts: HashMap<i32, i64>,
pub nan_value_counts: HashMap<i32, i64>,
pub lower_bounds: HashMap<i32, Vec<u8>>,
pub upper_bounds: HashMap<i32, Vec<u8>>,
pub statistics: HashMap<i32, ColumnStats>,
pub sort_order_id: Option<i32>,
pub key_metadata: Option<Vec<u8>>,
pub split_offsets: Option<Vec<i64>>,
pub equality_ids: Option<Vec<i32>>,
}Expand description
Metadata about a data or delete file.
Fields§
§file_path: StringPath to the file.
file_format: FileFormatThe file format.
content: FileContentThe type of content in this file.
partition: HashMap<String, Value>The partition data for this file.
record_count: i64Number of records in this file.
file_size_in_bytes: i64File size in bytes.
column_sizes: HashMap<i32, i64>Column sizes (column_id -> size in bytes).
value_counts: HashMap<i32, i64>Value counts (column_id -> non-null value count).
null_value_counts: HashMap<i32, i64>Null value counts (column_id -> null value count).
nan_value_counts: HashMap<i32, i64>NaN value counts (column_id -> NaN count).
lower_bounds: HashMap<i32, Vec<u8>>Lower bounds (column_id -> serialized lower bound).
upper_bounds: HashMap<i32, Vec<u8>>Upper bounds (column_id -> serialized upper bound).
statistics: HashMap<i32, ColumnStats>Column-level statistics.
sort_order_id: Option<i32>Sort order ID, if the file is sorted.
key_metadata: Option<Vec<u8>>Key metadata for encryption.
split_offsets: Option<Vec<i64>>Split offsets for the file.
equality_ids: Option<Vec<i32>>Field IDs used for equality comparison in equality delete files. This is required for content=EqualityDeletes and should be null otherwise.
Implementations§
Source§impl DataFile
impl DataFile
Sourcepub fn new(
file_path: impl Into<String>,
file_format: FileFormat,
record_count: i64,
file_size_in_bytes: i64,
) -> Self
pub fn new( file_path: impl Into<String>, file_format: FileFormat, record_count: i64, file_size_in_bytes: i64, ) -> Self
Creates a new data file with minimal required fields.
Sourcepub fn with_partition(self, partition: HashMap<String, Value>) -> Self
pub fn with_partition(self, partition: HashMap<String, Value>) -> Self
Sets the partition data for this file.
Sourcepub fn with_column_stats(
self,
column_id: i32,
size: i64,
value_count: i64,
null_count: i64,
) -> Self
pub fn with_column_stats( self, column_id: i32, size: i64, value_count: i64, null_count: i64, ) -> Self
Adds column statistics.
Sourcepub fn with_content(self, content: FileContent) -> Self
pub fn with_content(self, content: FileContent) -> Self
Sets the content type (e.g., Data, PositionDeletes, EqualityDeletes).
Sourcepub fn with_equality_ids(self, ids: Vec<i32>) -> Self
pub fn with_equality_ids(self, ids: Vec<i32>) -> Self
Sets the equality IDs for equality delete files.
Sourcepub fn with_key_metadata(self, metadata: Vec<u8>) -> Self
pub fn with_key_metadata(self, metadata: Vec<u8>) -> Self
Sets the key metadata.
Sourcepub fn with_split_offsets(self, offsets: Vec<i64>) -> Self
pub fn with_split_offsets(self, offsets: Vec<i64>) -> Self
Sets the split offsets.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataFile
impl<'de> Deserialize<'de> for DataFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DataFile
impl RefUnwindSafe for DataFile
impl Send for DataFile
impl Sync for DataFile
impl Unpin for DataFile
impl UnwindSafe for DataFile
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
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> ⓘ
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