This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new dc874709d7 [feature-wip](array-type) support array<decimal128> in mysql_result_writer (#9998) dc874709d7 is described below commit dc874709d78809ed192e0d4e34b77c263bd2f00d Author: yinzhijian <373141...@qq.com> AuthorDate: Thu Jun 9 15:15:26 2022 +0800 [feature-wip](array-type) support array<decimal128> in mysql_result_writer (#9998) --- be/src/vec/sink/mysql_result_writer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/be/src/vec/sink/mysql_result_writer.cpp b/be/src/vec/sink/mysql_result_writer.cpp index 489b70ed8c..55fa8aaf41 100644 --- a/be/src/vec/sink/mysql_result_writer.cpp +++ b/be/src/vec/sink/mysql_result_writer.cpp @@ -283,6 +283,12 @@ int VMysqlResultWriter::_add_one_cell(const ColumnPtr& column_ptr, size_t row_id char buf[64]; char* pos = datetime.to_string(buf); return buffer.push_string(buf, pos - buf - 1); + } else if (which.is_decimal128()) { + auto& column_data = + static_cast<const ColumnDecimal<vectorized::Decimal128>&>(*column).get_data(); + DecimalV2Value decimal_val(column_data[row_idx]); + auto decimal_str = decimal_val.to_string(); + return buffer.push_string(decimal_str.c_str(), decimal_str.length()); } else if (which.is_array()) { auto& column_array = assert_cast<const ColumnArray&>(*column); auto& offsets = column_array.get_offsets(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org