@@ -936,7 +936,7 @@ TEST_F(DataframeBytecodeTest, PlanQuery_SingleColIndex_EqFilter_NonNullInt) {
936936
937937 std::vector<uint32_t > p_vec (100 );
938938 std::iota (p_vec.begin (), p_vec.end (), 0 );
939- df.AddIndex (
939+ df = df .AddIndex (
940940 Index ({0 }, std::make_shared<std::vector<uint32_t >>(std::move (p_vec))));
941941
942942 std::vector<FilterSpec> filters = {{0 , 0 , Eq{}, std::nullopt }};
@@ -962,7 +962,7 @@ TEST_F(DataframeBytecodeTest, PlanQuery_SingleColIndex_InFilter_NonNullInt) {
962962
963963 std::vector<uint32_t > p_vec (100 );
964964 std::iota (p_vec.begin (), p_vec.end (), 0 );
965- df.AddIndex (
965+ df = df .AddIndex (
966966 Index ({0 }, std::make_shared<std::vector<uint32_t >>(std::move (p_vec))));
967967
968968 std::vector<FilterSpec> filters = {{0 , 0 , In{}, std::nullopt }};
@@ -992,8 +992,8 @@ TEST_F(DataframeBytecodeTest,
992992 df.InsertUnchecked (kSpec ,
993993 std::make_optional (string_pool_.InternString (" apple" )));
994994 df.Finalize ();
995- df.AddIndex (Index ({0 }, std::make_shared<std::vector<uint32_t >>(
996- std::vector<uint32_t >{1 , 0 , 3 , 2 })));
995+ df = df .AddIndex (Index ({0 }, std::make_shared<std::vector<uint32_t >>(
996+ std::vector<uint32_t >{1 , 0 , 3 , 2 })));
997997
998998 std::vector<FilterSpec> filters = {{0 , 0 , Eq{}, std::nullopt }};
999999 std::string expected_bytecode = R"(
@@ -1021,8 +1021,8 @@ TEST_F(DataframeBytecodeTest, PlanQuery_SingleColIndex_EqFilter_DenseNullInt) {
10211021 df.InsertUnchecked (kSpec , std::make_optional (20u ));
10221022 df.InsertUnchecked (kSpec , std::make_optional (10u ));
10231023 df.Finalize ();
1024- df.AddIndex (Index ({0 }, std::make_shared<std::vector<uint32_t >>(
1025- std::vector<uint32_t >{1 , 0 , 3 , 2 })));
1024+ df = df .AddIndex (Index ({0 }, std::make_shared<std::vector<uint32_t >>(
1025+ std::vector<uint32_t >{1 , 0 , 3 , 2 })));
10261026
10271027 std::vector<FilterSpec> filters = {{0 , 0 , Eq{}, std::nullopt }};
10281028 std::string expected_bytecode = R"(
@@ -1053,7 +1053,7 @@ TEST_F(DataframeBytecodeTest, PlanQuery_MultiColIndex_PrefixEqFilters) {
10531053
10541054 std::vector<uint32_t > p_vec (4 );
10551055 std::iota (p_vec.begin (), p_vec.end (), 0 );
1056- df.AddIndex (
1056+ df = df .AddIndex (
10571057 Index ({0 , 1 }, std::make_shared<std::vector<uint32_t >>(std::move (p_vec))));
10581058
10591059 std::vector<FilterSpec> filters = {
@@ -1714,8 +1714,8 @@ TEST(DataframeTest, TypedCursorInFilterWithIndex) {
17141714
17151715 // Build an index on track_id (column 1). Sorted order: 1,1,1,2,2,3
17161716 // Permutation: {0, 2, 5, 1, 4, 3}
1717- df.AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1718- std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
1717+ df = df .AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1718+ std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
17191719
17201720 // IN (1, 3) should return rows 0, 2, 5 (track_id=1) and 3 (track_id=3).
17211721 using FV = TypedCursor::FilterValue;
@@ -1749,8 +1749,8 @@ TEST(DataframeTest, TypedCursorInFilterWithIndexReverseOrder) {
17491749 df.InsertUnchecked (kSpec , std::monostate (), 1u );
17501750 df.Finalize ();
17511751
1752- df.AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1753- std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
1752+ df = df .AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1753+ std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
17541754
17551755 // IN (3, 1) — reverse order relative to index sort.
17561756 using FV = TypedCursor::FilterValue;
@@ -1785,8 +1785,8 @@ TEST(DataframeTest, TypedCursorInFilterWithIndexDoesNotCorruptIndex) {
17851785 df.InsertUnchecked (kSpec , std::monostate (), 1u );
17861786 df.Finalize ();
17871787
1788- df.AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1789- std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
1788+ df = df .AddIndex (Index ({1 }, std::make_shared<std::vector<uint32_t >>(
1789+ std::vector<uint32_t >{0 , 2 , 5 , 1 , 4 , 3 })));
17901790
17911791 // First: execute an IN filter that uses the index.
17921792 {
0 commit comments