@@ -281,7 +281,27 @@ class LuminaGlobalIndexTest : public ::testing::Test {
281281 std::vector<float > query_ = {1 .0f , 1 .0f , 1 .0f , 1 .1f };
282282};
283283
284- TEST_F (LuminaGlobalIndexTest, TestSimple) {
284+ class LuminaGlobalIndexBackendTest : public LuminaGlobalIndexTest ,
285+ public ::testing::WithParamInterface<std::string> {
286+ public:
287+ void SetUp () override {
288+ LuminaGlobalIndexTest::SetUp ();
289+ options_[" lumina.index.type" ] = GetParam ();
290+ if (GetParam () == " flatnsw" ) {
291+ options_[" lumina.flatnsw.build.thread_count" ] = " 1" ;
292+ // Use a large search width for the small dataset to reduce approximate-search misses.
293+ options_[" lumina.flatnsw.search.ef_search" ] = " 64" ;
294+ }
295+ }
296+ };
297+
298+ INSTANTIATE_TEST_SUITE_P (Backends, LuminaGlobalIndexBackendTest,
299+ ::testing::Values (std::string(" bruteforce" ), std::string(" flatnsw" )),
300+ [](const ::testing::TestParamInfo<std::string>& info) {
301+ return info.param ;
302+ });
303+
304+ TEST_P (LuminaGlobalIndexBackendTest, TestSimple) {
285305 auto test_root_dir = paimon::test::UniqueTestDirectory::Create ();
286306 ASSERT_TRUE (test_root_dir);
287307 std::string test_root = test_root_dir->Str ();
@@ -315,7 +335,7 @@ TEST_F(LuminaGlobalIndexTest, TestSimple) {
315335 }
316336}
317337
318- TEST_F (LuminaGlobalIndexTest , TestWithFilter) {
338+ TEST_P (LuminaGlobalIndexBackendTest , TestWithFilter) {
319339 auto test_root_dir = paimon::test::UniqueTestDirectory::Create ();
320340 ASSERT_TRUE (test_root_dir);
321341 std::string test_root = test_root_dir->Str ();
@@ -736,7 +756,7 @@ TEST_F(LuminaGlobalIndexTest, TestWriteAndReadWithTagFilter) {
736756 }
737757}
738758
739- TEST_F (LuminaGlobalIndexTest , TestWriteAndReadWithMixedTagPredicates) {
759+ TEST_P (LuminaGlobalIndexBackendTest , TestWriteAndReadWithMixedTagPredicates) {
740760 auto test_root_dir = paimon::test::UniqueTestDirectory::Create ();
741761 ASSERT_TRUE (test_root_dir);
742762 std::string test_root = test_root_dir->Str ();
@@ -1360,7 +1380,7 @@ TEST_F(LuminaGlobalIndexTest, TestHighCardinalityAndMultiThreadSearch) {
13601380 }
13611381}
13621382
1363- TEST_F (LuminaGlobalIndexTest , TestWriteWithNullRows) {
1383+ TEST_P (LuminaGlobalIndexBackendTest , TestWriteWithNullRows) {
13641384 auto test_root_dir = paimon::test::UniqueTestDirectory::Create ();
13651385 ASSERT_TRUE (test_root_dir);
13661386 std::string test_root = test_root_dir->Str ();
0 commit comments