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


##########
be/src/vec/data_types/serde/data_type_array_serde.cpp:
##########
@@ -85,47 +85,60 @@ void DataTypeArraySerDe::read_column_from_arrow(IColumn& 
column, const arrow::Ar
 }
 
 template <bool is_binary_format>
-Status DataTypeArraySerDe::_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 {
-    int buf_ret = 0;
+Status DataTypeArraySerDe::_write_column_to_mysql(const IColumn& column,
+                                                  
MysqlRowBuffer<is_binary_format>& result,
+                                                  int row_idx, bool col_const) 
const {
     auto& column_array = assert_cast<const ColumnArray&>(column);
     auto& offsets = column_array.get_offsets();
     auto& data = column_array.get_data();
     bool is_nested_string = data.is_column_string();
-    for (ssize_t i = start; i < end; ++i) {
-        if (0 != buf_ret) {
-            return Status::InternalError("pack mysql buffer failed.");
+    const auto col_index = index_check_const(row_idx, col_const);
+    result.open_dynamic_mode();
+    if (0 != result.push_string("[", 1)) {

Review Comment:
   Why not use UNLIKELY here ? sometimes U use it , sometimes not , please keep 
behavior-consistency. 



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