mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-07 04:12:59 +00:00
test: fix random data may break test case (#2514)
this test adds a new vector and then performs vector search with distance range. this may fail if the new vector becomes the closest one to the query vector Signed-off-by: BubbleCal <bubble-cal@outlook.com>
This commit is contained in:
@@ -272,7 +272,9 @@ async def test_distance_range_with_new_rows_async():
|
|||||||
# append more rows so that execution plan would be mixed with ANN & Flat KNN
|
# append more rows so that execution plan would be mixed with ANN & Flat KNN
|
||||||
new_data = pa.table(
|
new_data = pa.table(
|
||||||
{
|
{
|
||||||
"vector": pa.FixedShapeTensorArray.from_numpy_ndarray(np.random.rand(4, 2)),
|
"vector": pa.FixedShapeTensorArray.from_numpy_ndarray(
|
||||||
|
np.random.rand(4, 2) + 1
|
||||||
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
await table.add(new_data)
|
await table.add(new_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user