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


##########
be/src/vec/aggregate_functions/aggregate_function.h:
##########
@@ -491,6 +498,41 @@ class IAggregateFunctionHelper : public IAggregateFunction 
{
                                                                                
     arena);
         assert_cast<const Derived*, 
TypeCheckOnRelease::DISABLE>(this)->merge(place, rhs, arena);
     }
+
+    Status verify_result_type(const bool without_key, const DataTypes& 
argument_types_with_nullable,
+                              const DataTypePtr result_type_with_nullable) 
const override {
+        DataTypePtr function_result_type = assert_cast<const 
Derived*>(this)->get_return_type();
+
+        if (function_result_type->equals(*result_type_with_nullable)) {
+            return Status::OK();
+        }
+
+        if (!remove_nullable(function_result_type)
+                     ->equals(*remove_nullable(result_type_with_nullable))) {
+            return Status::InternalError(
+                    "Result type is not matched, planner expect {}, but get 
{}, wihout group by: "
+                    "{}",
+                    result_type_with_nullable->get_name(), 
function_result_type->get_name(),
+                    without_key);
+        }
+
+        if (without_key == true) {

Review Comment:
   warning: redundant boolean literal supplied to boolean operator 
[readability-simplify-boolean-expr]
   
   ```suggestion
           if (without_key) {
   ```
   



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