zclllyybb commented on code in PR #58490:
URL: https://github.com/apache/doris/pull/58490#discussion_r2576641422


##########
be/src/vec/aggregate_functions/aggregate_function_min_max.h:
##########
@@ -522,12 +523,152 @@ struct SingleValueDataString {
     }
 };
 
+struct SingleValueDataComplexType {
+private:
+    using Self = SingleValueDataComplexType;
+
+    DataTypePtr column_type;
+    bool has_value = false;
+    MutableColumnPtr column_data; // a column ptr only save a single value
+    int be_exec_version = -1;
+
+public:
+    SingleValueDataComplexType() = default;
+    SingleValueDataComplexType(const DataTypes& argument_types, int 
be_version) {
+        column_type = argument_types[0];
+        column_data = column_type->create_column();
+        be_exec_version = be_version;
+    }
+
+    bool has() const { return has_value; }
+
+    constexpr static bool IsFixedLength = false;
+
+    void insert_result_into(IColumn& to) const {
+        if (has()) {
+            to.insert_from(*column_data, 0);
+        } else {
+            to.insert_default();
+        }
+    }
+
+    void reset() {
+        has_value = false;
+        column_data->clear();
+    }
+
+    void write(BufferWritable& buf) const {
+        buf.write_binary(has_value);
+        if (!has()) {
+            return;
+        }
+        auto size_bytes =
+                column_type->get_uncompressed_serialized_bytes(*column_data, 
be_exec_version);

Review Comment:
   serialize相关函数,都不需要be_exec_version了,相关逻辑单独提个pr删了吧



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