Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] implement append, commit and flush for spann segment and index #3084

Merged
merged 14 commits into from
Dec 4, 2024
17 changes: 17 additions & 0 deletions rust/blockstore/src/types/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ impl BlockfileWriter {
}
}

pub async fn get_owned<
K: Key + Into<KeyWrapper> + ArrowWriteableKey,
V: Value + Writeable + ArrowWriteableValue,
>(
&self,
prefix: &str,
key: K,
) -> Result<Option<V::PreparedValue>, Box<dyn ChromaError>> {
match self {
BlockfileWriter::MemoryBlockfileWriter(_) => todo!(),
BlockfileWriter::ArrowUnorderedBlockfileWriter(writer) => {
writer.get_owned::<K, V>(prefix, key).await
}
BlockfileWriter::ArrowOrderedBlockfileWriter(_) => todo!(),
}
}

pub fn id(&self) -> uuid::Uuid {
match self {
BlockfileWriter::MemoryBlockfileWriter(writer) => writer.id(),
Expand Down
Loading
Loading