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


##########
be/src/vec/functions/array/function_array_element.h:
##########
@@ -129,7 +129,8 @@ class FunctionArrayElement : public IFunction {
 
 private:
     //=========================== map element===========================//
-    ColumnPtr _get_mapped_idx(const ColumnArray& column, const 
ColumnWithTypeAndName& argument) {
+    ColumnPtr _get_mapped_idx(const ColumnArray& column,

Review Comment:
   warning: function '_get_mapped_idx' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] ColumnPtr _get_mapped_idx(const ColumnArray& column, const 
ColumnWithTypeAndName& argument) const {
   ```
   



##########
be/src/vec/functions/function.h:
##########
@@ -430,9 +430,9 @@ class IFunction : public 
std::enable_shared_from_this<IFunction>,
 
     bool is_stateful() const override { return false; }
 
-    /// TODO: make const
-    Status execute_impl(FunctionContext* context, Block& block, const 
ColumnNumbers& arguments,
-                        size_t result, size_t input_rows_count) override = 0;
+    virtual Status execute_impl(FunctionContext* context, Block& block,

Review Comment:
   warning: 'virtual' is redundant since the function is already declared 
'override' [modernize-use-override]
   
   ```suggestion
       Status execute_impl(FunctionContext* context, Block& block,
   ```
   



##########
be/src/vec/functions/array/function_array_distance.h:
##########
@@ -170,7 +170,7 @@ class FunctionArrayDistance : public IFunction {
     }
 
 private:
-    bool _check_input_type(const DataTypePtr& type) {
+    bool _check_input_type(const DataTypePtr& type) const {

Review Comment:
   warning: function '_check_input_type' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] bool _check_input_type(const DataTypePtr& type) const {
   ```
   



##########
be/src/vec/functions/array/function_array_sort.h:
##########
@@ -80,7 +80,7 @@ class FunctionArraySort : public IFunction {
     }
 
 private:
-    ColumnPtr _execute(const ColumnArray& src_column_array) {
+    ColumnPtr _execute(const ColumnArray& src_column_array) const {

Review Comment:
   warning: function '_execute' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] ColumnPtr _execute(const ColumnArray& src_column_array) 
const {
   ```
   



##########
be/src/vec/functions/function_json.cpp:
##########
@@ -974,7 +974,8 @@ class FunctionJsonContains : public IFunction {
         return true;
     }
 
-    bool json_contains_array(const rapidjson::Value& target, const 
rapidjson::Value& search_value) {
+    bool json_contains_array(const rapidjson::Value& target,

Review Comment:
   warning: function 'json_contains_array' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] bool json_contains_array(const rapidjson::Value& target, 
const rapidjson::Value& search_value) const {
   ```
   



##########
be/src/vec/functions/function_string.h:
##########
@@ -2665,7 +2666,7 @@ class FunctionReplace : public IFunction {
     }
 
 private:
-    std::string replace(std::string str, std::string_view old_str, 
std::string_view new_str) {
+    std::string replace(std::string str, std::string_view old_str, 
std::string_view new_str) const {

Review Comment:
   warning: function 'replace' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] std::string replace(std::string str, std::string_view 
old_str, std::string_view new_str) const {
   ```
   



##########
be/src/vec/functions/match.h:
##########
@@ -66,22 +66,22 @@ class FunctionMatchBase : public IFunction {
     }
 
     Status execute_impl(FunctionContext* context, Block& block, const 
ColumnNumbers& arguments,
-                        size_t result, size_t input_rows_count) override;
+                        size_t result, size_t input_rows_count) const override;
 
     virtual Status execute_match(const std::string& column_name, const 
std::string& match_query_str,
                                  size_t input_rows_count, const ColumnString* 
string_col,
                                  InvertedIndexCtx* inverted_index_ctx,
                                  const ColumnArray::Offsets64* array_offsets,
-                                 ColumnUInt8::Container& result) = 0;
+                                 ColumnUInt8::Container& result) const = 0;
 
-    doris::segment_v2::InvertedIndexQueryType get_query_type_from_fn_name();
+    doris::segment_v2::InvertedIndexQueryType get_query_type_from_fn_name() 
const;

Review Comment:
   warning: function 'get_query_type_from_fn_name' should be marked 
[[nodiscard]] [modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] doris::segment_v2::InvertedIndexQueryType 
get_query_type_from_fn_name() const;
   ```
   



##########
be/src/vec/functions/function_string.h:
##########
@@ -2181,7 +2182,7 @@ class FunctionExtractURLParameter : public IFunction {
     }
 
 private:
-    StringRef extract_url(StringRef url, StringRef parameter) {
+    StringRef extract_url(StringRef url, StringRef parameter) const {

Review Comment:
   warning: function 'extract_url' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] StringRef extract_url(StringRef url, StringRef parameter) 
const {
   ```
   



##########
be/src/vec/functions/uuid_numeric.cpp:
##########
@@ -137,7 +137,7 @@ class UuidNumeric : public IFunction {
         /// It is guaranteed (by PaddedPODArray) that we can overwrite up to 
15 bytes after end.
     }
 
-    UInt64 randomSeed() {
+    UInt64 randomSeed() const {

Review Comment:
   warning: function 'randomSeed' should be marked [[nodiscard]] 
[modernize-use-nodiscard]
   
   ```suggestion
       [[nodiscard]] UInt64 randomSeed() const {
   ```
   



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