Skip to content

Commit 0a4c78c

Browse files
committed
fix
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
1 parent 6610d9c commit 0a4c78c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

rust/lance-index/src/vector/ivf.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ impl IvfTransformer {
244244

245245
#[inline]
246246
pub fn compute_partitions(&self, data: &FixedSizeListArray) -> Result<UInt32Array> {
247-
Ok(compute_partitions_arrow_array(&self.centroids, data, self.distance_type)?.into())
247+
Ok(
248+
compute_partitions_arrow_array(&self.centroids, data, self.distance_type)
249+
.map(|(part_ids, _)| part_ids.into())?,
250+
)
248251
}
249252

250253
pub fn find_partitions(&self, query: &dyn Array, nprobes: usize) -> Result<UInt32Array> {

rust/lance-index/src/vector/residual.rs

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ where
7777
dimension,
7878
distance_type.expect("provide either partitions or distance type"),
7979
)
80+
.0
8081
.into()
8182
});
8283
let part_ids = part_ids.values();

0 commit comments

Comments
 (0)