Copilot commented on code in PR #66449:
URL: https://github.com/apache/doris/pull/66449#discussion_r3718937409


##########
be/src/exprs/vsearch.cpp:
##########
@@ -44,7 +42,7 @@ struct SearchInputBundle {
     std::unordered_map<std::string, IndexIterator*> iterators;
     std::unordered_map<std::string, IndexFieldNameAndTypePair> field_types;
     std::unordered_map<std::string, int> field_name_to_column_id;
-    std::vector<int> column_ids;
+    std::vector<int> column_indexes;
     ColumnsWithTypeAndName literal_args;
 };

Review Comment:
   `column_ids` was renamed to `column_indexes`, but `field_name_to_column_id` 
still stores the scan column *index* (per the new helper comment). This 
mismatch makes it easy to reintroduce the index-vs-ColumnId confusion that this 
PR is fixing. Consider renaming to `field_name_to_column_index` (and updating 
its uses) for consistency and clarity.



##########
be/test/exprs/vsearch_expr_test.cpp:
##########
@@ -35,13 +35,15 @@
 #include "exprs/vsearch.h"
 #include "storage/index/index_iterator.h"
 #include "storage/segment/variant/nested_group_provider.h"
+#include "storage/tablet/tablet_schema.h"
 
 #if defined(__clang__)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wkeyword-macro"
 #endif
 #define private public
 #include "exprs/vslot_ref.h"
+#include "storage/segment/segment.h"
 #undef private

Review Comment:
   `#define private public` affects access control for every header included 
between the macro and `#undef`. `segment.h` does not appear to require 
private-member access in this test (it’s only used to call the constructor), so 
it should be included outside the macro block to avoid unintentionally altering 
class definitions in this translation unit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to