HappenLee commented on code in PR #64624:
URL: https://github.com/apache/doris/pull/64624#discussion_r3543016550


##########
be/src/exprs/aggregate/aggregate_function_null.h:
##########
@@ -135,6 +142,29 @@ class AggregateFunctionNullBaseInline : public 
IAggregateFunctionHelper<Derived>
 
     bool is_blockable() const override { return 
nested_function->is_blockable(); }
 
+    const std::vector<size_t>& get_const_argument_indexes() const override {
+        return nested_function->get_const_argument_indexes();
+    }
+
+    Status set_const_arguments(const ColumnsWithTypeAndName& arguments) 
override {
+        has_const_null_argument = false;
+        const auto& const_argument_indexes = 
nested_function->get_const_argument_indexes();
+        for (auto index : const_argument_indexes) {
+            if (index >= arguments.size() || !arguments[index].column) 
[[unlikely]] {
+                return Status::InternalError(
+                        "Aggregate function {} requires invalid const argument 
{}",
+                        nested_function->get_name(), index);
+            }
+            const auto& argument = arguments[index];
+            const_argument_idx[index] = true;
+            if (this->argument_types[index]->is_nullable() && 
argument.column->is_null_at(0)) {
+                has_const_null_argument = true;
+                return Status::OK();

Review Comment:
   如果有一个常量列是null的话,现在是什么行为呢?我觉得现在这个行为怪怪的



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