airborne12 commented on code in PR #54276:
URL: https://github.com/apache/doris/pull/54276#discussion_r2268876169
##########
be/src/olap/tablet_schema.h:
##########
@@ -470,7 +477,7 @@ class TabletSchema : public MetadataAdder<TabletSchema> {
}
return inverted_indexes;
}
- bool has_inverted_index() const {
+ bool has_extra_index() const {
Review Comment:
Why combine inverted and ann index together?
use has_inverted_index() || has_ann_index() instead of has_extra_index()?
##########
be/src/cloud/cloud_internal_service.cpp:
##########
@@ -345,7 +345,7 @@ void
CloudInternalServiceImpl::warm_up_rowset(google::protobuf::RpcController* c
// inverted index
auto schema_ptr = rs_meta.tablet_schema();
auto idx_version = schema_ptr->get_inverted_index_storage_format();
- bool has_inverted_index = schema_ptr->has_inverted_index();
+ bool has_inverted_index = schema_ptr->has_extra_index();
Review Comment:
changing function name but without changing return value name
##########
be/src/pipeline/exec/scan_operator.h:
##########
@@ -133,7 +133,7 @@ class ScanLocalState : public ScanLocalStateBase {
: ScanLocalStateBase(state, parent) {}
~ScanLocalState() override = default;
- Status init(RuntimeState* state, LocalStateInfo& info) override;
+ virtual Status init(RuntimeState* state, LocalStateInfo& info) override;
Review Comment:
Why not use MOCK_FUNCTION?
##########
be/src/vector/faiss_vector_index.cpp:
##########
@@ -0,0 +1,396 @@
+// Licensed to the Apache Software Foundation (ASF) under one
Review Comment:
naming directory as vector_index is better or just move it into
olap/rowset/segment_v2
##########
be/src/vector/faiss_vector_index.cpp:
##########
@@ -0,0 +1,396 @@
+// 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.
+
+#include "faiss_vector_index.h"
+
+#include <faiss/index_io.h>
+#include <omp.h>
+
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <limits>
+#include <memory>
+#include <string>
+
+#include "CLucene/store/IndexInput.h"
+#include "CLucene/store/IndexOutput.h"
+#include "common/exception.h"
+#include "common/logging.h"
+#include "common/status.h"
+#include "faiss/IndexHNSW.h"
+#include "faiss/MetricType.h"
+#include "faiss/impl/io.h"
+#include "olap/rowset/segment_v2/ann_index/ann_search_params.h"
+#include "vec/core/types.h"
+#include "vector/vector_index.h"
+
+namespace doris::segment_v2 {
Review Comment:
why use segment_v2 name space, file is not in olap/segment_v2
--
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]