You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "amorynan (via GitHub)" <gi...@apache.org> on 2023/06/17 09:39:31 UTC

[GitHub] [doris] amorynan commented on a diff in pull request #20928: [improvement](serde) Optimizing the performance of mysql result writer

amorynan commented on code in PR #20928:
URL: https://github.com/apache/doris/pull/20928#discussion_r1233010896


##########
be/src/vec/data_types/serde/data_type_hll_serde.cpp:
##########
@@ -102,30 +102,38 @@ void DataTypeHLLSerDe::write_column_to_arrow(const IColumn& column, const UInt8*
 }
 
 template <bool is_binary_format>
-Status DataTypeHLLSerDe::_write_column_to_mysql(
-        const IColumn& column, bool return_object_data_as_binary,
-        std::vector<MysqlRowBuffer<is_binary_format>>& result, int row_idx, int start, int end,
-        bool col_const) const {
+Status DataTypeHLLSerDe::_write_column_to_mysql(const IColumn& column,
+                                                MysqlRowBuffer<is_binary_format>& result,
+                                                int row_idx, bool col_const) const {
     auto& data_column = assert_cast<const ColumnHLL&>(column);
-    int buf_ret = 0;
-    for (ssize_t i = start; i < end; ++i) {
-        if (0 != buf_ret) {
+    if constexpr (is_binary_format) {

Review Comment:
   is_binary_format can not present return_object_data_as_binary  , just because we have a switch return_object_data_as_binary,  so there is a situation with return_object_data_as_binary=true , but is_binary_format is false. 



-- 
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-unsubscribe@doris.apache.org

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


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