pub struct DataFileEntry {Show 18 fields
pub path: String,
pub record_count: u64,
pub file_size_bytes: u64,
pub centroid_b64: Option<String>,
pub radius: Option<f32>,
pub hnsw_offset: Option<u64>,
pub hnsw_len: Option<u64>,
pub vector_column: Option<String>,
pub vector_dim: Option<u32>,
pub extra_vector_indexes: Vec<ExtraVectorIndex>,
pub index_status: IndexStatus,
pub index_error: Option<String>,
pub batch_id: Option<String>,
pub embedding_model: Option<String>,
pub partition_value: Option<String>,
pub deletion_vector: Option<DeletionVector>,
pub first_row_id: Option<i64>,
pub column_stats: Option<String>,
}Expand description
Metadata about a single data file in a table snapshot.
Fields§
§path: StringRelative path within the warehouse (e.g., “data/part-00001.parquet”)
record_count: u64§file_size_bytes: u64§centroid_b64: Option<String>base64-encoded centroid F32 values (primary vector column)
radius: Option<f32>§hnsw_offset: Option<u64>§hnsw_len: Option<u64>§vector_column: Option<String>§vector_dim: Option<u32>§extra_vector_indexes: Vec<ExtraVectorIndex>Additional vector columns beyond the primary (empty for single-column tables).
index_status: IndexStatusIndex build status. Defaults to Ready for backward compatibility with old manifests.
index_error: Option<String>Human-readable error from a failed background index build. Set only when
index_status == IndexStatus::Failed; None otherwise.
batch_id: Option<String>Caller-supplied idempotency key. When set, write_batch_idempotent skips the
write if a file with the same batch_id is already committed in the snapshot.
embedding_model: Option<String>Embedding model identifier stored per-file so mixed-model tables (during migration) can be identified without reading the main metadata.json.
partition_value: Option<String>Partition value for this file (e.g. the agent_id UUID).
Written per-file when VectorStoragePolicy::partition_by is set.
Enables manifest-level pruning: search skips files whose partition_value
doesn’t match the requested partition filter, avoiding all HNSW I/O.
deletion_vector: Option<DeletionVector>Iceberg V3 Deletion Vector: Roaring Bitmap of deleted row positions. None for V2 tables or V3 tables with no deletes for this file. When present, scanner masks these row IDs from HNSW results.
first_row_id: Option<i64>Iceberg V3 Row Lineage: globally unique first row ID assigned to this file.
Computed at commit time from the table’s cumulative next-row-id counter.
None for V2 tables (row lineage requires format-version=3).
column_stats: Option<String>JSON-encoded BTreeMap<i32, FieldStats> (column_stats::extract_column_stats),
computed once from this file’s own Parquet footer at write/compaction time.
write_manifest_file decodes this to emit real value_counts/
null_value_counts/column_sizes/lower_bounds/upper_bounds Avro fields
instead of null, enabling row-group pruning for Spark/Trino/DuckDB reading
the table as plain Iceberg. None for files predating this feature, or where
extraction failed — always spec-safe since these fields are optional at every
format version.
Implementations§
Source§impl DataFileEntry
impl DataFileEntry
Sourcepub fn is_foreign(&self) -> bool
pub fn is_foreign(&self) -> bool
True iff this file was never written by the AI-Lake SDK — most likely rewritten
by a generic Iceberg engine (Spark/Trino OPTIMIZE/rewrite_data_files, DuckDB)
with no knowledge of AI-Lake.
Every AI-Lake write path (make_data_file_entry, make_data_file_entry_indexing)
computes and stores a centroid unconditionally, even for IndexStatus::Indexing
files — before the HNSW build itself completes. A missing centroid is therefore a
reliable “not ours” signal, distinct from IndexStatus::Failed (an internal
indexing failure on a file the SDK did write — see writer.rs::patch_index_failed,
which never touches centroid_b64). Shared by CompactionPlanner::plan(),
scanner.rs::search, and ailake info so the three can’t drift on the definition.
Sourcepub fn batch_ids(&self) -> Vec<String>
pub fn batch_ids(&self) -> Vec<String>
Decode batch_id into the set of original idempotency keys it covers.
A freshly-written file’s batch_id is a plain string (the caller-supplied
key). A file produced by compaction (merge_batch_ids) instead carries a
JSON-encoded array of every source file’s key(s), since one merged file can
supersede several idempotent writes at once. This tries the JSON-array form
first and falls back to treating the raw string as a single key — the two
encodings share the same Option<String> field so this is the only place
that needs to know the difference. Returns [] when batch_id is None.
Sourcepub fn merge_batch_ids(sources: &[DataFileEntry]) -> Option<String>
pub fn merge_batch_ids(sources: &[DataFileEntry]) -> Option<String>
Build the batch_id value for a file merging sources (compaction).
Flattens every source’s batch_ids() (not just source.batch_id verbatim —
a source may itself already be a previous merge, so this must decode before
re-encoding to avoid nesting JSON arrays deeper on every subsequent compaction
pass), dedups while preserving first-seen order, and re-encodes as a JSON
array. Returns None when no source carried a batch_id — compaction of
files that were never written idempotently produces a plain, key-less file,
same as before this method existed.
Trait Implementations§
Source§impl Clone for DataFileEntry
impl Clone for DataFileEntry
Source§fn clone(&self) -> DataFileEntry
fn clone(&self) -> DataFileEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataFileEntry
impl Debug for DataFileEntry
Source§impl<'de> Deserialize<'de> for DataFileEntry
impl<'de> Deserialize<'de> for DataFileEntry
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 DataFileEntry
impl RefUnwindSafe for DataFileEntry
impl Send for DataFileEntry
impl Sync for DataFileEntry
impl Unpin for DataFileEntry
impl UnsafeUnpin for DataFileEntry
impl UnwindSafe for DataFileEntry
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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