github-actions[bot] commented on code in PR #38908:
URL: https://github.com/apache/doris/pull/38908#discussion_r1709431253


##########
be/src/vec/exprs/vmulti_match_predicate.h:
##########
@@ -0,0 +1,75 @@
+// 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 <string>
+
+#include "common/object_pool.h"
+#include "common/status.h"
+#include "olap/inverted_index_parser.h"
+#include "udf/udf.h"
+#include "vec/exprs/vexpr.h"
+#include "vec/functions/function.h"
+
+namespace lucene {
+namespace analysis {

Review Comment:
   warning: nested namespaces can be concatenated 
[modernize-concat-nested-namespaces]
   
   ```suggestion
   namespace lucene::analysis {
   ```
   
   be/src/vec/exprs/vmulti_match_predicate.h:31:
   ```diff
   - }
   - } // namespace lucene
   + } // namespace lucene
   ```
   



##########
be/src/vec/exprs/vmulti_match_predicate.cpp:
##########
@@ -0,0 +1,255 @@
+// 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 "vec/exprs/vmulti_match_predicate.h"
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wshadow-field"
+#endif
+
+#include <CLucene/analysis/LanguageBasedAnalyzer.h>
+#include <fmt/format.h>
+#include <fmt/ranges.h> // IWYU pragma: keep
+#include <gen_cpp/Exprs_types.h>
+#include <glog/logging.h>
+#include <stddef.h>

Review Comment:
   warning: inclusion of deprecated C++ header 'stddef.h'; consider using 
'cstddef' instead [modernize-deprecated-headers]
   
   ```suggestion
   #include <cstddef>
   ```
   



##########
be/src/vec/exprs/vmulti_match_predicate.h:
##########
@@ -0,0 +1,75 @@
+// 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 <string>
+
+#include "common/object_pool.h"
+#include "common/status.h"
+#include "olap/inverted_index_parser.h"
+#include "udf/udf.h"
+#include "vec/exprs/vexpr.h"
+#include "vec/functions/function.h"
+
+namespace lucene {
+namespace analysis {
+class Analyzer;
+}
+} // namespace lucene
+namespace doris {
+class RowDescriptor;
+class RuntimeState;
+class TExprNode;
+namespace vectorized {
+class Block;
+class VExprContext;
+} // namespace vectorized
+} // namespace doris
+
+namespace doris::vectorized {
+
+class VMultiMatchPredicate final : public VExpr {
+    ENABLE_FACTORY_CREATOR(VMultiMatchPredicate);
+
+public:
+    VMultiMatchPredicate(const TExprNode& node);
+    ~VMultiMatchPredicate() override;
+    Status execute(VExprContext* context, Block* block, int* result_column_id) 
override;
+    Status prepare(RuntimeState* state, const RowDescriptor& desc, 
VExprContext* context) override;
+    Status open(RuntimeState* state, VExprContext* context,
+                FunctionContext::FunctionStateScope scope) override;
+    void close(VExprContext* context, FunctionContext::FunctionStateScope 
scope) override;
+    Status evaluate_inverted_index(VExprContext* context, uint32_t 
segment_num_rows) const override;
+    Result<segment_v2::InvertedIndexResultBitmap> 
_evaluate_inverted_index_by_field(
+            VExprContext* context, vectorized::ColumnsWithTypeAndName& 
arguments,
+            uint32_t segment_num_rows, std::string field) const;
+    const std::string& expr_name() const override;
+    const std::string& function_name() const;
+
+    std::string debug_string() const override;
+
+    const FunctionBasePtr function() { return _function; }

Review Comment:
   warning: return type 'const std::doris::vectorized::FunctionBasePtr' (aka 
'const shared_ptr<std::doris::vectorized::IFunctionBase>') is 'const'-qualified 
at the top level, which may reduce code readability without improving const 
correctness [readability-const-return-type]
   
   ```suggestion
       FunctionBasePtr function() { return _function; }
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to