Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions rust/lance-namespace-impls/src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
use lance::dataset::builder::DatasetBuilder;
use lance::dataset::transaction::{Operation, Transaction};
use lance::dataset::{Dataset, WriteMode, WriteParams};
use lance::index::{IndexParams, vector::VectorIndexParams};
use lance::index::{DatasetIndexExt, IndexParams, vector::VectorIndexParams};
use lance::session::Session;
use lance_index::scalar::{BuiltinIndexType, InvertedIndexParams, ScalarIndexParams};
use lance_index::vector::{
bq::RQBuildParams, hnsw::builder::HnswBuildParams, ivf::IvfBuildParams, pq::PQBuildParams,
sq::builder::SQBuildParams,
};
use lance_index::{DatasetIndexExt, IndexType, is_system_index};
use lance_index::{IndexType, is_system_index};
use lance_io::object_store::{ObjectStore, ObjectStoreParams, ObjectStoreRegistry};
use lance_linalg::distance::MetricType;
use lance_table::io::commit::ManifestNamingScheme;
Expand Down Expand Up @@ -2554,18 +2554,17 @@
));
}

let stats =
<Dataset as lance_index::DatasetIndexExt>::index_statistics(&dataset, index_name)
.await
.map_err(|e| {
Error::namespace_source(
format!(
"Failed to describe index statistics for '{}' on table '{}': {}",
index_name, table_uri, e
)
.into(),
let stats = <Dataset as DatasetIndexExt>::index_statistics(&dataset, index_name)
.await
.map_err(|e| {
Error::namespace_source(
format!(
"Failed to describe index statistics for '{}' on table '{}': {}",
index_name, table_uri, e
)
})?;
.into(),
)
})?;
let stats: serde_json::Value = serde_json::from_str(&stats).map_err(|e| {
Error::namespace_source(
format!(
Expand Down Expand Up @@ -2697,11 +2696,11 @@

#[cfg(test)]
mod tests {
use super::*;

Check warning on line 2699 in rust/lance-namespace-impls/src/dir.rs

View workflow job for this annotation

GitHub Actions / format

Diff in /home/runner/work/lance/lance/rust/lance-namespace-impls/src/dir.rs
use arrow_ipc::reader::StreamReader;
use lance::dataset::Dataset;
use lance_core::utils::tempfile::{TempStdDir, TempStrDir};
use lance_index::DatasetIndexExt;
use lance::index::DatasetIndexExt;
use lance_namespace::models::{
CreateTableRequest, JsonArrowDataType, JsonArrowField, JsonArrowSchema, ListTablesRequest,
};
Expand Down
Loading