pub struct AilakeFileReader { /* private fields */ }Implementations§
Source§impl AilakeFileReader
impl AilakeFileReader
pub fn new(bytes: Bytes, vector_column: &str, dim: u32) -> Self
Sourcepub fn ailk_offset(&self) -> AilakeResult<u64>
pub fn ailk_offset(&self) -> AilakeResult<u64>
Returns the absolute byte offset of the primary AILK section.
Reads ailake.footer_offset from the Parquet footer key-value metadata.
Sourcepub fn ailk_offset_for_column(&self, column: &str) -> AilakeResult<u64>
pub fn ailk_offset_for_column(&self, column: &str) -> AilakeResult<u64>
Returns the absolute byte offset of the AILK section for a named vector column.
For additional columns tries ailake.{column}.footer_offset first,
then falls back to ailake.footer_offset (primary / single-column files).
Sourcepub fn is_ailake_file(&self) -> bool
pub fn is_ailake_file(&self) -> bool
Returns true if the file contains an embedded AILK section.
Sourcepub fn read_header(&self) -> AilakeResult<AilakeHeader>
pub fn read_header(&self) -> AilakeResult<AilakeHeader>
Parse the 64-byte AI-Lake header from the embedded AILK section.
Sourcepub fn get_centroid(&self) -> AilakeResult<Centroid>
pub fn get_centroid(&self) -> AilakeResult<Centroid>
Read centroid + radius from the AILK section.
Sourcepub fn load_index(&self) -> AilakeResult<HnswIndex>
pub fn load_index(&self) -> AilakeResult<HnswIndex>
Load the HNSW index from the primary AILK section.
Sourcepub fn load_index_for_column(&self, column: &str) -> AilakeResult<HnswIndex>
pub fn load_index_for_column(&self, column: &str) -> AilakeResult<HnswIndex>
Load the HNSW index for a specific vector column.
Works for both single-column files (falls back to primary AILK) and
multi-column files written with AilakeFileWriter::write_multi.
Sourcepub fn load_any_index(&self) -> AilakeResult<AnyIndex>
pub fn load_any_index(&self) -> AilakeResult<AnyIndex>
Load primary index as AnyIndex, dispatching on header flags.
Sourcepub fn load_any_index_for_column(&self, column: &str) -> AilakeResult<AnyIndex>
pub fn load_any_index_for_column(&self, column: &str) -> AilakeResult<AnyIndex>
Load index for a specific vector column as AnyIndex.
Sourcepub fn read_parquet(&self) -> AilakeResult<(RecordBatch, Vec<Vec<f32>>)>
pub fn read_parquet(&self) -> AilakeResult<(RecordBatch, Vec<Vec<f32>>)>
Read the Parquet section (tabular data + decoded embeddings). The full file is valid Parquet; the AILK section is invisible to standard readers.
Sourcepub fn verify_integrity(&self) -> AilakeResult<()>
pub fn verify_integrity(&self) -> AilakeResult<()>
Verify the positional invariant: Parquet record_count == HNSW node_count.
Auto Trait Implementations§
impl !Freeze for AilakeFileReader
impl RefUnwindSafe for AilakeFileReader
impl Send for AilakeFileReader
impl Sync for AilakeFileReader
impl Unpin for AilakeFileReader
impl UnsafeUnpin for AilakeFileReader
impl UnwindSafe for AilakeFileReader
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> 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