uchenily commented on code in PR #55586:
URL: https://github.com/apache/doris/pull/55586#discussion_r2320702205


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -670,9 +670,17 @@ Status SegmentIterator::_apply_ann_topn_predicate() {
     vectorized::IColumn::MutablePtr result_column;
     std::unique_ptr<std::vector<uint64_t>> result_row_ids;
     segment_v2::AnnIndexStats ann_index_stats;
-    
RETURN_IF_ERROR(_ann_topn_runtime->evaluate_vector_ann_search(ann_index_iterator,
 &_row_bitmap,
-                                                                  
rows_of_segment, result_column,
-                                                                  
result_row_ids, ann_index_stats));
+    Status st = 
_ann_topn_runtime->evaluate_vector_ann_search(ann_index_iterator, &_row_bitmap,
+                                                              rows_of_segment, 
result_column,
+                                                              result_row_ids, 
ann_index_stats);
+    if (!st.ok()) {

Review Comment:
   For old data without adding ANN index, if the schema is changed (CREATE 
INDEX ... USING ANN), but have not run BUILD INDEX, the query should be 
downgraded instead of reporting an error (the error occurred because we 
attempted to apply ANN indexing on data that has not yet been indexed)



-- 
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