Skip to content

Commit d6dcb81

Browse files
committed
update ut
1 parent 219cfb5 commit d6dcb81

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎be/test/format_v2/table/lance_reader_test.cpp‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ TEST(LanceTableReaderVectorSearchTest, SplitWithoutIndexSegmentsSearchesFlat) {
11371137
results[mode] = read_vector_search_rows(&reader, &block);
11381138
ASSERT_EQ(5, results[mode].size());
11391139
EXPECT_TRUE(reader.close().ok());
1140-
auto* partitions = profile.get_counter("LanceIVFPartitionsSearched");
1140+
auto* partitions = profile.get_counter("LanceIndexPartitionsSearched");
11411141
ASSERT_NE(nullptr, partitions);
11421142
auto* flat = profile.get_counter("LancePlannedFlatSearchFragmentCount");
11431143
ASSERT_NE(nullptr, flat);
@@ -1458,7 +1458,9 @@ TEST(LanceTableReaderVectorSearchTest, MultiVectorTopOnePreservesPrecisionAndBat
14581458
EXPECT_NEAR(indexed ? 2.0F - std::sqrt(2.0F) : 1e-8F, rows[0].second,
14591459
indexed ? 1e-6F : 1e-13F);
14601460
EXPECT_TRUE(reader.close().ok());
1461-
EXPECT_EQ(indexed, profile.get_counter("LanceIVFPartitionsSearched")->value() > 0);
1461+
auto* partitions = profile.get_counter("LanceIndexPartitionsSearched");
1462+
ASSERT_NE(nullptr, partitions);
1463+
EXPECT_EQ(indexed, partitions->value() > 0);
14621464
}
14631465
}
14641466
}
@@ -1509,7 +1511,9 @@ TEST(LanceTableReaderVectorSearchTest, MultiVectorCosineMasksUndefinedRows) {
15091511
: std::vector<std::pair<int64_t, float>> {{2, 1}, {3, 1}};
15101512
EXPECT_EQ(expected, rows);
15111513
EXPECT_TRUE(reader.close().ok());
1512-
EXPECT_EQ(indexed, profile.get_counter("LanceIVFPartitionsSearched")->value() > 0);
1514+
auto* partitions = profile.get_counter("LanceIndexPartitionsSearched");
1515+
ASSERT_NE(nullptr, partitions);
1516+
EXPECT_EQ(indexed, partitions->value() > 0);
15131517
}
15141518
}
15151519
}
@@ -1549,7 +1553,9 @@ TEST(LanceTableReaderVectorSearchTest, MultiVectorDefaultMetricIsConsistentAcros
15491553
auto rows = read_vector_search_rows(&reader, &block);
15501554
all_rows.insert(all_rows.end(), rows.begin(), rows.end());
15511555
EXPECT_TRUE(reader.close().ok());
1552-
EXPECT_EQ(0, profile.get_counter("LanceIVFPartitionsSearched")->value());
1556+
auto* partitions = profile.get_counter("LanceIndexPartitionsSearched");
1557+
ASSERT_NE(nullptr, partitions);
1558+
EXPECT_EQ(0, partitions->value());
15531559
}
15541560
std::sort(all_rows.begin(), all_rows.end());
15551561
EXPECT_EQ((std::vector<std::pair<int64_t, float>> {{1, 0}, {2, 1}, {3, 4}, {6, 1}}), all_rows);

0 commit comments

Comments
 (0)