This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new b4d446055a [fix](agg) need to call 'set_version' in nested functions 
(#24381)
b4d446055a is described below

commit b4d446055a032fef883dd0c51c74ade76b96a1c4
Author: Jerry Hu <[email protected]>
AuthorDate: Fri Sep 15 17:20:20 2023 +0800

    [fix](agg) need to call 'set_version' in nested functions (#24381)
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/vec/aggregate_functions/aggregate_function_null.h        | 5 +++++
 be/src/vec/aggregate_functions/aggregate_function_state_merge.h | 5 +++++
 be/src/vec/aggregate_functions/aggregate_function_state_union.h | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/be/src/vec/aggregate_functions/aggregate_function_null.h 
b/be/src/vec/aggregate_functions/aggregate_function_null.h
index a0bb79dfc0..becb06f7cf 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_null.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_null.h
@@ -81,6 +81,11 @@ public:
         }
     }
 
+    void set_version(const int version_) override {
+        IAggregateFunctionHelper<Derived>::set_version(version_);
+        nested_function->set_version(version_);
+    }
+
     String get_name() const override {
         /// This is just a wrapper. The function for Nullable arguments is 
named the same as the nested function itself.
         return nested_function->get_name();
diff --git a/be/src/vec/aggregate_functions/aggregate_function_state_merge.h 
b/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
index 7afd79a1c8..052f4e6e85 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_state_merge.h
@@ -38,6 +38,11 @@ public:
         return std::make_shared<AggregateStateMerge>(function, argument_types, 
return_type);
     }
 
+    void set_version(const int version_) override {
+        IAggregateFunctionHelper::set_version(version_);
+        _function->set_version(version_);
+    }
+
     String get_name() const override { return _function->get_name() + 
AGG_MERGE_SUFFIX; }
 
     DataTypePtr get_return_type() const override { return 
_function->get_return_type(); }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_state_union.h 
b/be/src/vec/aggregate_functions/aggregate_function_state_union.h
index 2b2748828e..b2ff81b168 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_state_union.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_state_union.h
@@ -42,6 +42,11 @@ public:
         return std::make_shared<AggregateStateUnion>(function, argument_types, 
return_type);
     }
 
+    void set_version(const int version_) override {
+        IAggregateFunctionHelper::set_version(version_);
+        _function->set_version(version_);
+    }
+
     void create(AggregateDataPtr __restrict place) const override { 
_function->create(place); }
 
     String get_name() const override { return _function->get_name() + 
AGG_UNION_SUFFIX; }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to