@@ -92,12 +92,12 @@ VExprSPtr create_slot_ref(int column_id, const std::string& column_name) {
9292 return slot;
9393}
9494
95- std::shared_ptr<InvertedIndexContext > make_inverted_context (
95+ std::shared_ptr<IndexExecContext > make_inverted_context (
9696 std::vector<ColumnId>& col_ids,
9797 std::vector<std::unique_ptr<segment_v2::IndexIterator>>& index_iterators,
9898 std::vector<IndexFieldNameAndTypePair>& storage_types,
9999 std::unordered_map<ColumnId, std::unordered_map<const VExpr*, bool >>& status_map) {
100- return std::make_shared<InvertedIndexContext >(col_ids, index_iterators, storage_types,
100+ return std::make_shared<IndexExecContext >(col_ids, index_iterators, storage_types,
101101 status_map, nullptr );
102102}
103103
@@ -1068,8 +1068,8 @@ TEST_F(VSearchExprTest, TestCollectSearchInputsWithUnsupportedChildType) {
10681068 VExprContext context (dummy_expr);
10691069
10701070 // This should trigger the collect_search_inputs function, but since we don't have
1071- // a real InvertedIndexContext , it will return early with Status::OK
1072- // If we had a real InvertedIndexContext , it would reach the unsupported child type error
1071+ // a real IndexExecContext , it will return early with Status::OK
1072+ // If we had a real IndexExecContext , it would reach the unsupported child type error
10731073 auto status = vsearch_expr->evaluate_inverted_index (&context, 100 );
10741074 EXPECT_TRUE (status.ok ()); // Early return due to nullptr index_context
10751075}
@@ -1145,7 +1145,7 @@ TEST_F(VSearchExprTest, TestEvaluateInvertedIndexWithEmptyIterators) {
11451145 // This covers lines 138-141 in evaluate_inverted_index
11461146 auto vsearch_expr = VSearchExpr::create_shared (test_node);
11471147
1148- // Create a mock InvertedIndexContext that returns empty iterators
1148+ // Create a mock IndexExecContext that returns empty iterators
11491149 // For now, we test the early return path when index_context is nullptr
11501150 auto dummy_expr = VSearchExpr::create_shared (test_node);
11511151 VExprContext context (dummy_expr);
@@ -1301,8 +1301,8 @@ TEST_F(VSearchExprTest, FastExecuteReturnsPrecomputedColumn) {
13011301
13021302 auto inverted_ctx = make_inverted_context (col_ids, index_iterators, storage_types, status_map);
13031303 MutableColumnPtr result_column = ColumnUInt8::create ();
1304- inverted_ctx->set_inverted_index_result_column_for_expr (expr.get (), std::move (result_column));
1305- context->set_inverted_index_context (inverted_ctx);
1304+ inverted_ctx->set_index_result_column_for_expr (expr.get (), std::move (result_column));
1305+ context->set_index_context (inverted_ctx);
13061306
13071307 Block block;
13081308 int result_column_id = -1 ;
@@ -1325,7 +1325,7 @@ TEST_F(VSearchExprTest, EvaluateInvertedIndexFailsWithoutStorageType) {
13251325
13261326 auto inverted_ctx = make_inverted_context (col_ids, index_iterators, storage_types, status_map);
13271327 auto context = std::make_shared<VExprContext>(expr);
1328- context->set_inverted_index_context (inverted_ctx);
1328+ context->set_index_context (inverted_ctx);
13291329
13301330 auto status = expr->evaluate_inverted_index (context.get (), 128 );
13311331 EXPECT_FALSE (status.ok ());
@@ -1343,7 +1343,7 @@ TEST_F(VSearchExprTest, EvaluateInvertedIndexWithUnsupportedChildReturnsError) {
13431343
13441344 auto inverted_ctx = make_inverted_context (col_ids, index_iterators, storage_types, status_map);
13451345 auto context = std::make_shared<VExprContext>(expr);
1346- context->set_inverted_index_context (inverted_ctx);
1346+ context->set_index_context (inverted_ctx);
13471347
13481348 auto status = expr->evaluate_inverted_index (context.get (), 64 );
13491349 EXPECT_FALSE (status.ok ());
@@ -1363,7 +1363,7 @@ TEST_F(VSearchExprTest, EvaluateInvertedIndexHandlesMissingIterators) {
13631363
13641364 auto inverted_ctx = make_inverted_context (col_ids, index_iterators, storage_types, status_map);
13651365 auto context = std::make_shared<VExprContext>(expr);
1366- context->set_inverted_index_context (inverted_ctx);
1366+ context->set_index_context (inverted_ctx);
13671367
13681368 auto status = expr->evaluate_inverted_index (context.get (), 32 );
13691369 EXPECT_TRUE (status.ok ());
@@ -1384,15 +1384,15 @@ TEST_F(VSearchExprTest, EvaluateInvertedIndexPropagatesFunctionFailure) {
13841384
13851385 auto inverted_ctx = make_inverted_context (col_ids, index_iterators, storage_types, status_map);
13861386 auto context = std::make_shared<VExprContext>(expr);
1387- context->set_inverted_index_context (inverted_ctx);
1387+ context->set_index_context (inverted_ctx);
13881388
13891389 auto status = expr->evaluate_inverted_index (context.get (), 256 );
13901390 EXPECT_FALSE (status.ok ());
13911391 EXPECT_EQ (ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND, status.code ());
13921392 EXPECT_FALSE (status_map[0 ][expr.get ()]);
13931393}
13941394
1395- // Note: Full testing with actual InvertedIndexContext and real iterators
1395+ // Note: Full testing with actual IndexExecContext and real iterators
13961396// would require complex setup and is better suited for integration tests
13971397// The tests above cover the main execution paths in evaluate_inverted_index
13981398
0 commit comments