zhiqiang-hhhh commented on code in PR #55586:
URL: https://github.com/apache/doris/pull/55586#discussion_r2332616866


##########
be/src/olap/tablet_schema.cpp:
##########
@@ -1565,7 +1565,8 @@ void TabletSchema::update_tablet_columns(const 
TabletSchema& tablet_schema,
 
 bool TabletSchema::has_inverted_index_with_index_id(int64_t index_id) const {
     for (size_t i = 0; i < _indexes.size(); i++) {
-        if (_indexes[i]->index_type() == IndexType::INVERTED &&
+        if ((_indexes[i]->index_type() == IndexType::INVERTED ||

Review Comment:
   function name `has_inverted_index_with_index_id` is not changed? or maybe we 
need another method?



##########
be/src/olap/rowset/segment_v2/segment_iterator.h:
##########
@@ -191,13 +190,17 @@ class SegmentIterator : public RowwiseIterator {
     // calculate row ranges that satisfy requested column conditions using 
various column index
     [[nodiscard]] Status _get_row_ranges_by_column_conditions();
     [[nodiscard]] Status _get_row_ranges_from_conditions(RowRanges* 
condition_row_ranges);
+
     [[nodiscard]] Status _apply_bitmap_index();
     [[nodiscard]] Status _apply_inverted_index();
     [[nodiscard]] Status _apply_inverted_index_on_column_predicate(
             ColumnPredicate* pred, std::vector<ColumnPredicate*>& 
remaining_predicates,
             bool* continue_apply);
+    [[nodiscard]] Status _apply_ann_topn_predicate();

Review Comment:
   `[[nodiscard]]` is not necessary. since class `Status` has already been 
marked as `[[nodiscard]]`. You can make another pr to remove all useless 
`[[nodiscard]]` for Status.



##########
regression-test/suites/ann_index_p0/build_ann_index_test.groovy:
##########
@@ -0,0 +1,112 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("build_ann_index_test") {
+    if (isCloudMode()) {
+        return // TODO enable this case after enable light index in cloud mode

Review Comment:
   Any exception will be thrown? If so, make it a test case.



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