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


##########
be/src/vec/aggregate_functions/aggregate_function_min_max_by.h:
##########
@@ -18,15 +18,70 @@
 #pragma once
 
 #include "common/logging.h"
+#include "util/bitmap_value.h"
 #include "vec/aggregate_functions/aggregate_function.h"
 #include "vec/aggregate_functions/aggregate_function_min_max.h"
 #include "vec/aggregate_functions/helpers.h"
+#include "vec/columns/column_complex.h"
 #include "vec/columns/column_decimal.h"
 #include "vec/columns/column_vector.h"
 #include "vec/common/assert_cast.h"
+#include "vec/data_types/data_type_bitmap.h"
 #include "vec/io/io_helper.h"
 
 namespace doris::vectorized {
+
+/// For bitmap value
+struct BitmapValueData {
+private:
+    using Self = BitmapValueData;
+    bool has_value = false;
+    BitmapValue value;
+
+public:
+    BitmapValueData() = default;
+    BitmapValueData(bool has_value_, BitmapValue value_) : 
has_value(has_value_), value(value_) {}
+    [[nodiscard]] bool has() const { return has_value; }
+
+    void insert_result_into(IColumn& to) const {
+        if (has()) {
+            assert_cast<ColumnBitmap&>(to).get_data().push_back(value);
+        } else {
+            assert_cast<ColumnBitmap&>(to).insert_default();
+        }
+    }
+
+    void reset() {
+        if (has()) {
+            has_value = false;
+        }
+    }
+
+    void write(BufferWritable& buf) const {
+        write_binary(has(), buf);
+        if (has()) {
+            DataTypeBitMap::serialize_as_stream(value, buf);
+        }
+    }
+
+    void read(BufferReadable& buf, Arena* arena) {
+        read_binary(has_value, buf);
+        if (has()) {
+            DataTypeBitMap::deserialize_as_stream(value, buf);
+        }
+    }
+
+    void change(const IColumn& column, size_t row_num, Arena*) {

Review Comment:
   warning: all parameters should be named in a function 
[readability-named-parameter]
   
   ```suggestion
       void change(const IColumn& column, size_t row_num, Arena* /*unused*/) {
   ```
   



##########
be/src/vec/aggregate_functions/aggregate_function_min_max_by.h:
##########
@@ -18,15 +18,70 @@
 #pragma once
 
 #include "common/logging.h"
+#include "util/bitmap_value.h"
 #include "vec/aggregate_functions/aggregate_function.h"
 #include "vec/aggregate_functions/aggregate_function_min_max.h"
 #include "vec/aggregate_functions/helpers.h"
+#include "vec/columns/column_complex.h"
 #include "vec/columns/column_decimal.h"
 #include "vec/columns/column_vector.h"
 #include "vec/common/assert_cast.h"
+#include "vec/data_types/data_type_bitmap.h"
 #include "vec/io/io_helper.h"
 
 namespace doris::vectorized {
+
+/// For bitmap value
+struct BitmapValueData {
+private:
+    using Self = BitmapValueData;
+    bool has_value = false;
+    BitmapValue value;
+
+public:
+    BitmapValueData() = default;
+    BitmapValueData(bool has_value_, BitmapValue value_) : 
has_value(has_value_), value(value_) {}
+    [[nodiscard]] bool has() const { return has_value; }
+
+    void insert_result_into(IColumn& to) const {
+        if (has()) {
+            assert_cast<ColumnBitmap&>(to).get_data().push_back(value);
+        } else {
+            assert_cast<ColumnBitmap&>(to).insert_default();
+        }
+    }
+
+    void reset() {
+        if (has()) {
+            has_value = false;
+        }
+    }
+
+    void write(BufferWritable& buf) const {
+        write_binary(has(), buf);
+        if (has()) {
+            DataTypeBitMap::serialize_as_stream(value, buf);
+        }
+    }
+
+    void read(BufferReadable& buf, Arena* arena) {
+        read_binary(has_value, buf);
+        if (has()) {
+            DataTypeBitMap::deserialize_as_stream(value, buf);
+        }
+    }
+
+    void change(const IColumn& column, size_t row_num, Arena*) {
+        has_value = true;
+        value = assert_cast<const ColumnBitmap&>(column).get_data()[row_num];
+    }
+
+    void change(const Self& to, Arena*) {

Review Comment:
   warning: all parameters should be named in a function 
[readability-named-parameter]
   
   ```suggestion
       void change(const Self& to, Arena* /*unused*/) {
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to