github-actions[bot] commented on code in PR #30574:
URL: https://github.com/apache/doris/pull/30574#discussion_r1470805614
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
+ case InvertedIndexQueryType::EQUAL_QUERY:
case InvertedIndexQueryType::MATCH_ALL_QUERY:
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: 'ConjunctionQuery' does not refer to a value
[clang-diagnostic-error]
```cpp
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
^
```
<details>
<summary>Additional context</summary>
**be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:25:**
declared here
```cpp
class ConjunctionQuery;
^
```
</details>
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: no member named 'make_unique' in namespace 'std'
[clang-diagnostic-error]
```cpp
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
^
```
##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -691,52 +549,50 @@ Status BkdIndexReader::bkd_query(OlapReaderStatistics*
stats, const std::string&
return Status::Error<ErrorCode::INVERTED_INDEX_NOT_SUPPORTED>(
"invalid query type when query bkd index");
}
- visitor->set_reader(r.get());
return Status::OK();
}
-Status BkdIndexReader::invoke_bkd_try_query(OlapReaderStatistics* stats,
- const std::string& column_name,
const void* query_value,
+Status BkdIndexReader::invoke_bkd_try_query(const void* query_value,
Review Comment:
warning: method 'invoke_bkd_try_query' can be made static
[readability-convert-member-functions-to-static]
be/src/olap/rowset/segment_v2/inverted_index_reader.h:263:
```diff
- Status invoke_bkd_try_query(const void* query_value,
InvertedIndexQueryType query_type,
+ static Status invoke_bkd_try_query(const void* query_value,
InvertedIndexQueryType query_type,
```
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
+ case InvertedIndexQueryType::EQUAL_QUERY:
case InvertedIndexQueryType::MATCH_ALL_QUERY:
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: expected ')' [clang-diagnostic-error]
```cpp
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
^
```
<details>
<summary>Additional context</summary>
**be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:39:**
to match this '('
```cpp
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
^
```
</details>
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
+ case InvertedIndexQueryType::EQUAL_QUERY:
case InvertedIndexQueryType::MATCH_ALL_QUERY:
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: no member named 'make_unique' in namespace 'std'
[clang-diagnostic-error]
```cpp
return
std::make_unique<ConjunctionQuery>(std::forward<Args>(args)...);
^
```
##########
be/src/olap/rowset/segment_v2/inverted_index_searcher.h:
##########
@@ -0,0 +1,65 @@
+// 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.
+
+#pragma once
+
+#include <CLucene.h>
Review Comment:
warning: 'CLucene.h' file not found [clang-diagnostic-error]
```cpp
#include <CLucene.h>
^
```
##########
be/src/olap/rowset/segment_v2/inverted_index_cache.cpp:
##########
@@ -301,8 +88,8 @@ int64_t InvertedIndexSearcherCache::mem_consumption() {
return _policy->cache()->mem_consumption();
}
-bool InvertedIndexSearcherCache::_lookup(const
InvertedIndexSearcherCache::CacheKey& key,
- InvertedIndexCacheHandle* handle) {
+bool InvertedIndexSearcherCache::lookup(const
InvertedIndexSearcherCache::CacheKey& key,
Review Comment:
warning: method 'lookup' can be made static
[readability-convert-member-functions-to-static]
be/src/olap/rowset/segment_v2/inverted_index_cache.h:106:
```diff
- bool lookup(const InvertedIndexSearcherCache::CacheKey& key,
InvertedIndexCacheHandle* handle);
+ static bool lookup(const InvertedIndexSearcherCache::CacheKey& key,
InvertedIndexCacheHandle* handle);
```
##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -746,47 +602,46 @@
return Status::OK();
}
-Status BkdIndexReader::invoke_bkd_query(OlapReaderStatistics* stats, const
std::string& column_name,
- const void* query_value,
InvertedIndexQueryType query_type,
+Status BkdIndexReader::invoke_bkd_query(const void* query_value,
InvertedIndexQueryType query_type,
Review Comment:
warning: method 'invoke_bkd_query' can be made static
[readability-convert-member-functions-to-static]
be/src/olap/rowset/segment_v2/inverted_index_reader.h:265:
```diff
- Status invoke_bkd_query(const void* query_value,
InvertedIndexQueryType query_type,
+ static Status invoke_bkd_query(const void* query_value,
InvertedIndexQueryType query_type,
```
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@ class QueryFactory {
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
Review Comment:
warning: no template named 'unique_ptr' in namespace 'std'
[clang-diagnostic-error]
```cpp
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
^
```
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: 'DisjunctionQuery' does not refer to a value
[clang-diagnostic-error]
```cpp
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
^
```
<details>
<summary>Additional context</summary>
**be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:24:**
declared here
```cpp
class DisjunctionQuery;
^
```
</details>
##########
be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:
##########
@@ -34,8 +34,8 @@
static std::unique_ptr<Query> create(InvertedIndexQueryType query_type,
Args&&... args) {
switch (query_type) {
case InvertedIndexQueryType::MATCH_ANY_QUERY:
- case InvertedIndexQueryType::EQUAL_QUERY:
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
Review Comment:
warning: expected ')' [clang-diagnostic-error]
```cpp
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
^
```
<details>
<summary>Additional context</summary>
**be/src/olap/rowset/segment_v2/inverted_index/query/query_factory.h:36:**
to match this '('
```cpp
return
std::make_unique<DisjunctionQuery>(std::forward<Args>(args)...);
^
```
</details>
--
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]