github-actions[bot] commented on code in PR #33173: URL: https://github.com/apache/doris/pull/33173#discussion_r1557416709
########## be/src/pipeline/exec/distinct_streaming_aggregation_operator.h: ########## @@ -17,6 +17,7 @@ #pragma once +#include <glog/logging.h> Review Comment: warning: 'glog/logging.h' file not found [clang-diagnostic-error] ```cpp #include <glog/logging.h> ^ ``` ########## be/src/vec/columns/column_nullable.h: ########## @@ -232,6 +232,11 @@ class ColumnNullable final : public COWHelper<IColumn, ColumnNullable> { append_data_by_selector_impl<ColumnNullable>(res, selector); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_const.h: ########## @@ -253,6 +253,10 @@ class ColumnConst final : public COWHelper<IColumn, ColumnConst> { const IColumn::Selector& selector) const override { assert_cast<Self&>(*res).resize(selector.size()); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_string.h: ########## @@ -521,6 +521,10 @@ class ColumnString final : public COWHelper<IColumn, ColumnString> { append_data_by_selector_impl<ColumnString>(res, selector); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_object.h: ########## @@ -385,7 +385,14 @@ class ColumnObject final : public COWHelper<IColumn, ColumnObject> { void insert(const Field& field) override { try_insert(field); } void append_data_by_selector(MutableColumnPtr& res, - const IColumn::Selector& selector) const override; + const IColumn::Selector& selector) const override { + append_data_by_selector_impl<ColumnObject>(res, selector); + } + + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_array.h: ########## @@ -207,6 +207,10 @@ class ColumnArray final : public COWHelper<IColumn, ColumnArray> { const IColumn::Selector& selector) const override { return append_data_by_selector_impl<ColumnArray>(res, selector); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_dummy.h: ########## @@ -130,6 +130,20 @@ class IColumnDummy : public IColumn { for (size_t i = 0; i < selector.size(); ++i) res->insert_from(*this, selector[i]); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { + size_t num_rows = size(); + + if (num_rows < selector.size()) { + LOG(FATAL) << fmt::format("Size of selector: {}, is larger than size of column:{}", + selector.size(), num_rows); + } + + res->reserve(num_rows); + + for (size_t i = begin; i < end; ++i) res->insert_from(*this, selector[i]); Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion for (size_t i = begin; i < end; ++i) { res->insert_from(*this, selector[i]); } ``` ########## be/src/vec/columns/column_map.h: ########## @@ -133,6 +133,10 @@ class ColumnMap final : public COWHelper<IColumn, ColumnMap> { const IColumn::Selector& selector) const override { return append_data_by_selector_impl<ColumnMap>(res, selector); } + void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, + size_t begin, size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const IColumn::Selector& selector, size_t begin, size_t end) override { ``` ########## be/src/vec/columns/column_struct.h: ########## @@ -130,6 +130,10 @@ class ColumnStruct final : public COWHelper<IColumn, ColumnStruct> { void append_data_by_selector(MutableColumnPtr& res, const Selector& selector) const override { return append_data_by_selector_impl<ColumnStruct>(res, selector); } + void append_data_by_selector(MutableColumnPtr& res, const Selector& selector, size_t begin, + size_t end) const override { Review Comment: warning: method 'append_data_by_selector' can be made static [readability-convert-member-functions-to-static] ```suggestion static void append_data_by_selector(MutableColumnPtr& res, const Selector& selector, size_t begin, size_t end) override { ``` -- 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