github-actions[bot] commented on code in PR #25786:
URL: https://github.com/apache/doris/pull/25786#discussion_r1417185806
##########
be/src/runtime/fold_constant_executor.cpp:
##########
@@ -158,96 +158,124 @@ Status FoldConstantExecutor::_prepare_and_open(Context*
ctx) {
return ctx->open(_runtime_state.get());
}
-string FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
+Status FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
Review Comment:
warning: method '_get_result' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static Status FoldConstantExecutor::_get_result(void* src, size_t size,
const TypeDescriptor& type,
```
##########
be/src/runtime/fold_constant_executor.h:
##########
@@ -52,9 +53,9 @@
template <typename Context>
Status _prepare_and_open(Context* ctx);
- std::string _get_result(void* src, size_t size, const TypeDescriptor& type,
- const vectorized::ColumnPtr column_ptr,
- const vectorized::DataTypePtr column_type);
+ Status _get_result(void* src, size_t size, const TypeDescriptor& type,
+ const vectorized::ColumnPtr column_ptr,
+ const vectorized::DataTypePtr column_type, std::string&
result);
Review Comment:
warning: parameter 'column_type' is const-qualified in the function
declaration; const-qualification of parameters only has an effect in function
definitions [readability-avoid-const-params-in-decls]
```suggestion
vectorized::DataTypePtr column_type, std::string&
result);
```
##########
be/src/runtime/fold_constant_executor.cpp:
##########
@@ -158,96 +158,124 @@
return ctx->open(_runtime_state.get());
}
-string FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
+Status FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
Review Comment:
warning: function '_get_result' exceeds recommended size/complexity
thresholds [readability-function-size]
```cpp
Status FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
^
```
<details>
<summary>Additional context</summary>
**be/src/runtime/fold_constant_executor.cpp:160:** 115 lines including
whitespace and comments (threshold 80)
```cpp
Status FoldConstantExecutor::_get_result(void* src, size_t size, const
TypeDescriptor& type,
^
```
</details>
##########
be/src/runtime/fold_constant_executor.h:
##########
@@ -52,9 +53,9 @@ class FoldConstantExecutor {
template <typename Context>
Status _prepare_and_open(Context* ctx);
- std::string _get_result(void* src, size_t size, const TypeDescriptor& type,
- const vectorized::ColumnPtr column_ptr,
- const vectorized::DataTypePtr column_type);
+ Status _get_result(void* src, size_t size, const TypeDescriptor& type,
+ const vectorized::ColumnPtr column_ptr,
Review Comment:
warning: parameter 'column_ptr' is const-qualified in the function
declaration; const-qualification of parameters only has an effect in function
definitions [readability-avoid-const-params-in-decls]
```suggestion
vectorized::ColumnPtr column_ptr,
```
--
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]