This is an automated email from the ASF dual-hosted git repository. eldenmoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 20a0c373de9 [fix](serde) Fix the behavior of serializing ip/date types nested in complex types… (#47889) 20a0c373de9 is described below commit 20a0c373de9540ba8f63fd97ed74b5d8df7774c1 Author: amory <wangqian...@selectdb.com> AuthorDate: Mon Feb 24 20:51:13 2025 +0800 [fix](serde) Fix the behavior of serializing ip/date types nested in complex types… (#47889) Fix the behavior of serializing ip/date types nested in complex types before with to_json we will have this result if we meet ip/date type in complex type ``` {\"a\": 1, \"b\": \"b1\", \"c\": 192.168.1.1, \"d\": 1.000000000} ``` after we fix the behavior ``` {"a":1,"b":"b1","c":"192.168.1.1","d":1.0} ``` --- .../data_types/serde/data_type_date64_serde.cpp | 13 ++- .../serde/data_type_datetimev2_serde.cpp | 10 +- .../data_types/serde/data_type_datev2_serde.cpp | 9 ++ .../vec/data_types/serde/data_type_ipv4_serde.cpp | 9 ++ .../vec/data_types/serde/data_type_ipv6_serde.cpp | 11 +++ .../vec/data_types/common_data_type_serder_test.h | 14 ++- be/test/vec/data_types/data_type_array_test.cpp | 5 +- be/test/vec/data_types/data_type_ip_test.cpp | 109 ++++++++++++++++++++- .../data_types/serde/data_type_serde_text_test.cpp | 32 +++--- .../outfile/csv/test_outfile_csv_array_type.out | Bin 7168 -> 7204 bytes .../outfile/csv/test_outfile_csv_complex_type.out | Bin 8537 -> 8577 bytes .../outfile/csv/test_outfile_csv_map_type.out | Bin 13751 -> 13841 bytes 12 files changed, 188 insertions(+), 24 deletions(-) diff --git a/be/src/vec/data_types/serde/data_type_date64_serde.cpp b/be/src/vec/data_types/serde/data_type_date64_serde.cpp index 390703fafbf..24dc98c3e19 100644 --- a/be/src/vec/data_types/serde/data_type_date64_serde.cpp +++ b/be/src/vec/data_types/serde/data_type_date64_serde.cpp @@ -38,6 +38,9 @@ Status DataTypeDate64SerDe::serialize_one_cell_to_json(const IColumn& column, in auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; + if (_nesting_level > 1) { + bw.write('"'); + } Int64 int_val = assert_cast<const ColumnInt64&>(*ptr).get_element(row_num); if (options.date_olap_format) { tm time_tm; @@ -56,6 +59,9 @@ Status DataTypeDate64SerDe::serialize_one_cell_to_json(const IColumn& column, in char* pos = value.to_string(buf); bw.write(buf, pos - buf - 1); } + if (_nesting_level > 1) { + bw.write('"'); + } return Status::OK(); } @@ -69,6 +75,9 @@ Status DataTypeDate64SerDe::deserialize_column_from_json_vector( Status DataTypeDate64SerDe::deserialize_one_cell_from_json(IColumn& column, Slice& slice, const FormatOptions& options) const { auto& column_data = assert_cast<ColumnInt64&>(column); + if (_nesting_level > 1) { + slice.trim_quote(); + } Int64 val = 0; if (options.date_olap_format) { tm time_tm; @@ -159,11 +168,11 @@ Status DataTypeDateTimeSerDe::deserialize_one_cell_from_json(IColumn& column, Sl void DataTypeDate64SerDe::write_column_to_arrow(const IColumn& column, const NullMap* null_map, arrow::ArrayBuilder* array_builder, int64_t start, int64_t end, const cctz::time_zone& ctz) const { - const auto& col_data = static_cast<const ColumnVector<Int64>&>(column).get_data(); + auto& col_data = static_cast<const ColumnVector<Int64>&>(column).get_data(); auto& string_builder = assert_cast<arrow::StringBuilder&>(*array_builder); for (size_t i = start; i < end; ++i) { char buf[64]; - const auto* time_val = (const VecDateTimeValue*)(&col_data[i]); + const VecDateTimeValue* time_val = (const VecDateTimeValue*)(&col_data[i]); size_t len = time_val->to_buffer(buf); if (null_map && (*null_map)[i]) { checkArrowStatus(string_builder.AppendNull(), column.get_name(), diff --git a/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp b/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp index f43b2919c40..46227f3842c 100644 --- a/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp +++ b/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp @@ -48,7 +48,9 @@ Status DataTypeDateTimeV2SerDe::serialize_one_cell_to_json(const IColumn& column auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; - + if (_nesting_level > 1) { + bw.write('"'); + } UInt64 int_val = assert_cast<const ColumnUInt64&, TypeCheckOnRelease::DISABLE>(*ptr).get_element( row_num); @@ -67,6 +69,9 @@ Status DataTypeDateTimeV2SerDe::serialize_one_cell_to_json(const IColumn& column char* pos = val.to_string(buf); bw.write(buf, pos - buf - 1); } + if (_nesting_level > 1) { + bw.write('"'); + } return Status::OK(); } @@ -79,6 +84,9 @@ Status DataTypeDateTimeV2SerDe::deserialize_column_from_json_vector( Status DataTypeDateTimeV2SerDe::deserialize_one_cell_from_json(IColumn& column, Slice& slice, const FormatOptions& options) const { auto& column_data = assert_cast<ColumnUInt64&, TypeCheckOnRelease::DISABLE>(column); + if (_nesting_level > 1) { + slice.trim_quote(); + } UInt64 val = 0; if (options.date_olap_format) { DateV2Value<DateTimeV2ValueType> datetimev2_value; diff --git a/be/src/vec/data_types/serde/data_type_datev2_serde.cpp b/be/src/vec/data_types/serde/data_type_datev2_serde.cpp index 9749f5f0980..159ff1394be 100644 --- a/be/src/vec/data_types/serde/data_type_datev2_serde.cpp +++ b/be/src/vec/data_types/serde/data_type_datev2_serde.cpp @@ -41,6 +41,9 @@ Status DataTypeDateV2SerDe::serialize_column_to_json(const IColumn& column, int6 Status DataTypeDateV2SerDe::serialize_one_cell_to_json(const IColumn& column, int64_t row_num, BufferWritable& bw, FormatOptions& options) const { + if (_nesting_level > 1) { + bw.write('"'); + } auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; @@ -52,6 +55,9 @@ Status DataTypeDateV2SerDe::serialize_one_cell_to_json(const IColumn& column, in char* pos = val.to_string(buf); // DateTime to_string the end is /0 bw.write(buf, pos - buf - 1); + if (_nesting_level > 1) { + bw.write('"'); + } return Status::OK(); } @@ -64,6 +70,9 @@ Status DataTypeDateV2SerDe::deserialize_column_from_json_vector( Status DataTypeDateV2SerDe::deserialize_one_cell_from_json(IColumn& column, Slice& slice, const FormatOptions& options) const { + if (_nesting_level > 1) { + slice.trim_quote(); + } auto& column_data = assert_cast<ColumnUInt32&>(column); UInt32 val = 0; if (options.date_olap_format) { diff --git a/be/src/vec/data_types/serde/data_type_ipv4_serde.cpp b/be/src/vec/data_types/serde/data_type_ipv4_serde.cpp index 44972cbfe4f..904a1401a0d 100644 --- a/be/src/vec/data_types/serde/data_type_ipv4_serde.cpp +++ b/be/src/vec/data_types/serde/data_type_ipv4_serde.cpp @@ -70,6 +70,9 @@ Status DataTypeIPv4SerDe::write_column_to_mysql(const IColumn& column, Status DataTypeIPv4SerDe::serialize_one_cell_to_json(const IColumn& column, int64_t row_num, BufferWritable& bw, FormatOptions& options) const { + if (_nesting_level > 1) { + bw.write('"'); + } auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; @@ -77,11 +80,17 @@ Status DataTypeIPv4SerDe::serialize_one_cell_to_json(const IColumn& column, int6 IPv4Value ipv4_value(data); std::string ipv4_str = ipv4_value.to_string(); bw.write(ipv4_str.c_str(), ipv4_str.length()); + if (_nesting_level > 1) { + bw.write('"'); + } return Status::OK(); } Status DataTypeIPv4SerDe::deserialize_one_cell_from_json(IColumn& column, Slice& slice, const FormatOptions& options) const { + if (_nesting_level > 1) { + slice.trim_quote(); + } auto& column_data = reinterpret_cast<ColumnIPv4&>(column); ReadBuffer rb(slice.data, slice.size); IPv4 val = 0; diff --git a/be/src/vec/data_types/serde/data_type_ipv6_serde.cpp b/be/src/vec/data_types/serde/data_type_ipv6_serde.cpp index 70d2165494b..69771a48034 100644 --- a/be/src/vec/data_types/serde/data_type_ipv6_serde.cpp +++ b/be/src/vec/data_types/serde/data_type_ipv6_serde.cpp @@ -92,6 +92,9 @@ void DataTypeIPv6SerDe::write_one_cell_to_jsonb(const IColumn& column, Status DataTypeIPv6SerDe::serialize_one_cell_to_json(const IColumn& column, int64_t row_num, BufferWritable& bw, FormatOptions& options) const { + if (_nesting_level > 1) { + bw.write('"'); + } auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; @@ -99,11 +102,17 @@ Status DataTypeIPv6SerDe::serialize_one_cell_to_json(const IColumn& column, int6 IPv6Value ipv6_value(data); std::string ipv6_str = ipv6_value.to_string(); bw.write(ipv6_str.c_str(), ipv6_str.length()); + if (_nesting_level > 1) { + bw.write('"'); + } return Status::OK(); } Status DataTypeIPv6SerDe::deserialize_one_cell_from_json(IColumn& column, Slice& slice, const FormatOptions& options) const { + if (_nesting_level > 1) { + slice.trim_quote(); + } auto& column_data = reinterpret_cast<ColumnIPv6&>(column); ReadBuffer rb(slice.data, slice.size); IPv6 val = 0; @@ -176,6 +185,8 @@ void DataTypeIPv6SerDe::read_column_from_arrow(IColumn& column, const arrow::Arr std::string(raw_data, raw_data_len).c_str()); } col_data.emplace_back(ipv6_val); + } else { + col_data.emplace_back(0); } } } diff --git a/be/test/vec/data_types/common_data_type_serder_test.h b/be/test/vec/data_types/common_data_type_serder_test.h index 7bb3735c45c..3c800bd8b99 100644 --- a/be/test/vec/data_types/common_data_type_serder_test.h +++ b/be/test/vec/data_types/common_data_type_serder_test.h @@ -24,14 +24,17 @@ #include <fstream> #include <iostream> +#include "arrow/array/array_base.h" #include "arrow/type.h" #include "runtime/descriptors.h" #include "util/arrow/block_convertor.h" #include "util/arrow/row_batch.h" #include "vec/columns/column.h" +#include "vec/columns/column_array.h" #include "vec/core/field.h" #include "vec/core/types.h" #include "vec/data_types/data_type.h" +#include "vec/runtime/ipv6_value.h" #include "vec/utils/arrow_column_to_doris_column.h" // this test is gonna to be a data type serialize and deserialize functions @@ -357,12 +360,16 @@ public: Status stt = convert_to_arrow_batch(*block, block_arrow_schema, arrow::default_memory_pool(), &result, _timezone_obj); EXPECT_EQ(Status::OK(), stt) << "convert block to arrow failed" << stt.to_string(); + // deserialize arrow to block auto assert_block = block->clone_empty(); auto rows = block->rows(); for (size_t i = 0; i < load_cols.size(); ++i) { auto array = result->column(i); + std::cout << array.get()->ToString() << std::endl; auto& column_with_type_and_name = assert_block.get_by_position(i); + std::cout << "now we are testing column: " + << column_with_type_and_name.column->get_name() << std::endl; auto ret = arrow_column_to_doris_column( array.get(), 0, column_with_type_and_name.column, column_with_type_and_name.type, rows, _timezone_obj); @@ -371,12 +378,13 @@ public: << column_with_type_and_name.column->get_name() << " with column size: " << column_with_type_and_name.column->size() << std::endl; - std::cout << assert_block.dump_structure() << std::endl; EXPECT_EQ(Status::OK(), ret) << "convert arrow to block failed" << ret.to_string(); auto& col = block->get_by_position(i).column; auto& assert_col = column_with_type_and_name.column; + std::cout << "column: " << col->get_name() << " size: " << col->size() + << " assert size: " << assert_col->size() << std::endl; EXPECT_EQ(assert_col->size(), col->size()); - for (size_t j = 0; j < col->size(); ++j) { + for (size_t j = 0; j < assert_col->size(); ++j) { auto cell = col->operator[](j); auto assert_cell = assert_col->operator[](j); EXPECT_EQ(cell, assert_cell) << "column: " << col->get_name() << " row: " << j; @@ -390,4 +398,4 @@ public: // can just be replaced by jsonb format }; -} // namespace doris::vectorized \ No newline at end of file +} // namespace doris::vectorized diff --git a/be/test/vec/data_types/data_type_array_test.cpp b/be/test/vec/data_types/data_type_array_test.cpp index 1c0ee6f97ef..4a9969a65b0 100644 --- a/be/test/vec/data_types/data_type_array_test.cpp +++ b/be/test/vec/data_types/data_type_array_test.cpp @@ -502,6 +502,7 @@ TEST_F(DataTypeArrayTest, SerdeArrowTest) { array_cols.push_back(array_columns[i]->get_ptr()); } array_cols.push_back(array_columns[36]->get_ptr()); + array_cols.push_back(array_columns[38]->get_ptr()); DataTypes types; for (int i = 0; i < 17; i++) { types.push_back(array_types[i]); @@ -510,6 +511,7 @@ TEST_F(DataTypeArrayTest, SerdeArrowTest) { types.push_back(array_types[i]); } types.push_back(array_types[36]); + types.push_back(array_types[38]); DataTypeSerDeSPtrs serde; for (int i = 0; i < 17; i++) { serde.push_back(serdes[i]); @@ -518,9 +520,10 @@ TEST_F(DataTypeArrayTest, SerdeArrowTest) { serde.push_back(serdes[i]); } serde.push_back(serdes[36]); + serde.push_back(serdes[38]); CommonDataTypeSerdeTest::assert_arrow_format(array_cols, serde, types); { - for (int i = 38; i < 41; ++i) { + for (int i = 39; i < 41; ++i) { MutableColumns error_cols; error_cols.push_back(array_columns[i]->get_ptr()); DataTypeSerDeSPtrs serde1; diff --git a/be/test/vec/data_types/data_type_ip_test.cpp b/be/test/vec/data_types/data_type_ip_test.cpp index d26806b7dcb..6831820d23d 100644 --- a/be/test/vec/data_types/data_type_ip_test.cpp +++ b/be/test/vec/data_types/data_type_ip_test.cpp @@ -37,6 +37,7 @@ #include "vec/data_types/data_type.h" #include "vec/data_types/data_type_factory.hpp" #include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_struct.h" // this test is gonna to be a data type test template for all DataType which should make ut test to coverage the function defined // for example DataTypeIPv4 should test this function: @@ -156,7 +157,7 @@ TEST_F(DataTypeIPTest, GetFieldTest) { node_ipv6.node_type = TExprNodeType::IPV6_LITERAL; for (size_t i = 0; i < ip_cols[1]->size(); ++i) { node_ipv6.ipv6_literal.value = - IPv6Value::to_string(assert_cast<ColumnIPv6&>(*ip_cols[1]).get_data()[i]); + doris::IPv6Value::to_string(assert_cast<ColumnIPv6&>(*ip_cols[1]).get_data()[i]); Field assert_field; ip_cols[1]->get(i, assert_field); get_field_assert(dt_ipv6, node_ipv6, assert_field); @@ -265,4 +266,110 @@ TEST_F(DataTypeIPTest, SerdeMysqlAndArrowTest) { CommonDataTypeSerdeTest::assert_arrow_format(ip_cols, serde, {dt_ipv4, dt_ipv6}); } +TEST_F(DataTypeIPTest, SerdeTOJsonInComplex) { + // make array<ip> + auto array_ipv4 = std::make_shared<DataTypeArray>(dt_ipv4); + auto array_ipv6 = std::make_shared<DataTypeArray>(dt_ipv6); + auto map_ipv4 = std::make_shared<DataTypeMap>(dt_ipv4, dt_ipv6); + auto map_ipv6 = std::make_shared<DataTypeMap>(dt_ipv6, dt_ipv4); + auto column_array_ipv4 = array_ipv4->create_column(); + auto column_array_ipv6 = array_ipv6->create_column(); + auto column_map_ipv4 = map_ipv4->create_column(); + auto column_map_ipv6 = map_ipv6->create_column(); + // struct + auto struct_ip = std::make_shared<DataTypeStruct>(std::vector<DataTypePtr> { + dt_ipv4, dt_ipv6, array_ipv4, array_ipv6, map_ipv4, map_ipv6}); + auto column_struct_ip = struct_ip->create_column(); + + // insert some data into column + std::vector<string> ipv4_data = {"190.0.0.1", "127.0.0.1", "10.0.0.1"}; + std::vector<string> ipv6_data = {"2001:db8::1234", "2001:db8::1234:5678", "::"}; + std::vector<IPv4> ipv4_values; + std::vector<IPv6> ipv6_values; + // put data into column + for (size_t i = 0; i < ipv4_data.size(); ++i) { + IPv4 ipv4_val = 0; + IPv6 ipv6_val = 0; + IPv4Value::from_string(ipv4_val, ipv4_data[i]); + ipv4_values.push_back(ipv4_val); + IPv6Value::from_string(ipv6_val, ipv6_data[i]); + ipv6_values.push_back(ipv6_val); + } + + // pack array ipv4 + Array ipv4_array; + for (auto& ipv4 : ipv4_values) { + ipv4_array.push_back(ipv4); + } + column_array_ipv4->insert(ipv4_array); + + // pack array ipv6 + Array ipv6_array; + for (auto& ipv6 : ipv6_values) { + ipv6_array.push_back(ipv6); + } + column_array_ipv6->insert(ipv6_array); + + Map ipv4_map; + // pack map ipv4 + ipv4_map.push_back(ipv4_array); + ipv4_map.push_back(ipv6_array); + column_map_ipv4->insert(ipv4_map); + + // pack map ipv6 + Map ipv6_map; + ipv6_map.push_back(ipv6_array); + ipv6_map.push_back(ipv4_array); + column_map_ipv6->insert(ipv6_map); + + // pack struct + Tuple tuple; + tuple.push_back(ipv4_values[0]); + tuple.push_back(ipv6_values[0]); + tuple.push_back(ipv4_array); + tuple.push_back(ipv6_array); + tuple.push_back(ipv4_map); + tuple.push_back(ipv6_map); + column_struct_ip->insert(tuple); + + auto assert_func = [](DataTypePtr dt, MutableColumnPtr& col, string assert_json_str) { + // serde to json + auto from_serde = dt->get_serde(1); + auto dst_str = ColumnString::create(); + dst_str->clear(); + dst_str->reserve(1); + VectorBufferWriter write_buffer(*dst_str.get()); + DataTypeSerDe::FormatOptions options; + options.escape_char = '\\'; + auto st = from_serde->serialize_column_to_json(*col, 0, 1, write_buffer, options); + ASSERT_TRUE(st.ok()); + write_buffer.commit(); + StringRef json_str = dst_str->get_data_at(0); + // print + ASSERT_EQ(json_str.to_string(), assert_json_str); + }; + + std::vector<string> assert_json_arr_str = { + "[\"190.0.0.1\", \"127.0.0.1\", \"10.0.0.1\"]", + "[\"2001:db8::1234\", \"2001:db8::1234:5678\", \"::\"]"}; + std::vector<string> assert_json_map_str = { + "{\"190.0.0.1\":\"2001:db8::1234\", \"127.0.0.1\":\"2001:db8::1234:5678\", " + "\"10.0.0.1\":\"::\"}", + "{\"2001:db8::1234\":\"190.0.0.1\", \"2001:db8::1234:5678\":\"127.0.0.1\", " + "\"::\":\"10.0.0.1\"}"}; + string assert_json_struct_str = + "{\"1\": \"190.0.0.1\", \"2\": \"2001:db8::1234\", \"3\": [\"190.0.0.1\", " + "\"127.0.0.1\", \"10.0.0.1\"], \"4\": [\"2001:db8::1234\", \"2001:db8::1234:5678\", " + "\"::\"], \"5\": {\"190.0.0.1\":\"2001:db8::1234\", " + "\"127.0.0.1\":\"2001:db8::1234:5678\", \"10.0.0.1\":\"::\"}, \"6\": " + "{\"2001:db8::1234\":\"190.0.0.1\", \"2001:db8::1234:5678\":\"127.0.0.1\", " + "\"::\":\"10.0.0.1\"}}"; + + assert_func(array_ipv4, column_array_ipv4, assert_json_arr_str[0]); + assert_func(array_ipv6, column_array_ipv6, assert_json_arr_str[1]); + assert_func(map_ipv4, column_map_ipv4, assert_json_map_str[0]); + assert_func(map_ipv6, column_map_ipv6, assert_json_map_str[1]); + assert_func(struct_ip, column_struct_ip, assert_json_struct_str); +} + } // namespace doris::vectorized \ No newline at end of file diff --git a/be/test/vec/data_types/serde/data_type_serde_text_test.cpp b/be/test/vec/data_types/serde/data_type_serde_text_test.cpp index b65b3fc6f63..e5f10d1ca3d 100644 --- a/be/test/vec/data_types/serde/data_type_serde_text_test.cpp +++ b/be/test/vec/data_types/serde/data_type_serde_text_test.cpp @@ -399,14 +399,14 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) { "\"\\N\", " "\"\x1\x2\x3,\\u0001bc\"]", "[\"heeeee\", null, \"null\", \"\\N\", null, \"sssssssss\"]"}), - FieldType_RandStr( - FieldType::OLAP_FIELD_TYPE_DATE, - {"[\\\"2022-07-13\\\",\"2022-07-13 12:30:00\"]", - "[2022-07-13 12:30:00, \"2022-07-13\"]", - "[2022-07-13 12:30:00.000, 2022-07-13]"}, - {"[null, null]", "[2022-07-13, null]", "[2022-07-13, 2022-07-13]"}, - {"[null, 2022-07-13]", "[2022-07-13, 2022-07-13]", - "[2022-07-13, 2022-07-13]"}), + FieldType_RandStr(FieldType::OLAP_FIELD_TYPE_DATE, + {"[\\\"2022-07-13\\\",\"2022-07-13 12:30:00\"]", + "[2022-07-13 12:30:00, \"2022-07-13\"]", + "[2022-07-13 12:30:00.000, 2022-07-13]"}, + {"[null, \"2022-07-13\"]", "[\"2022-07-13\", \"2022-07-13\"]", + "[\"2022-07-13\", \"2022-07-13\"]"}, + {"[null, \"2022-07-13\"]", "[\"2022-07-13\", \"2022-07-13\"]", + "[\"2022-07-13\", \"2022-07-13\"]"}), FieldType_RandStr( FieldType::OLAP_FIELD_TYPE_DATETIME, { @@ -594,10 +594,10 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) { "{2022-07-13 12\\:30\\:00: 2022-07-13, 2022-07-13 12\\:30\\:00.000: " "2022-07-13 12:30:00.000, 2022-07-13:\'2022-07-13 12:30:00\'}", "\\N"}, - {"{2022-07-13:2022-07-13 12:30:00, 2022-07-13:null, 2022-07-13:null, " - "null:null, 2022-07-13:null}", - "{2022-07-13:2022-07-13 00:00:00, 2022-07-13:2022-07-13 12:30:00, " - "2022-07-13:null}", + {"{\"2022-07-13\":2022-07-13 12:30:00, \"2022-07-13\":null, " + "\"2022-07-13\":null, null:null, \"2022-07-13\":null}", + "{\"2022-07-13\":2022-07-13 00:00:00, \"2022-07-13\":2022-07-13 12:30:00, " + "\"2022-07-13\":null}", "\\N"}), FieldType_RandStr( FieldType::OLAP_FIELD_TYPE_DATETIME, FieldType::OLAP_FIELD_TYPE_DECIMAL, @@ -688,10 +688,10 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) { // escaped char ':' "{2022-07-13 12\\:30\\:00: 2022-07-13, 2022-07-13 12\\:30\\:00.000: " "2022-07-13 12:30:00.000, 2022-07-13:\'2022-07-13 12:30:00\'}"}, - {"{2022-07-13:2022-07-13 12:30:00, 2022-07-13:null, 2022-07-13:null, " - "null:null, 2022-07-13:2022-07-13 12:30:00}", - "{2022-07-13:2022-07-13 00:00:00, 2022-07-13:2022-07-13 12:30:00, " - "2022-07-13:2022-07-13 12:30:00}"}), + {"{\"2022-07-13\":2022-07-13 12:30:00, \"2022-07-13\":null, " + "\"2022-07-13\":null, null:null, \"2022-07-13\":2022-07-13 12:30:00}", + "{\"2022-07-13\":2022-07-13 00:00:00, \"2022-07-13\":2022-07-13 12:30:00, " + "\"2022-07-13\":2022-07-13 12:30:00}"}), FieldType_RandStr( FieldType::OLAP_FIELD_TYPE_DATETIME, FieldType::OLAP_FIELD_TYPE_DECIMAL, {"{2022-07-13 12:30:00: 12.45675432, 2022-07-13: 12.45675432, null: null}", diff --git a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_array_type.out b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_array_type.out index aaa81062ac7..ad3e83cd45f 100644 Binary files a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_array_type.out and b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_array_type.out differ diff --git a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_complex_type.out b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_complex_type.out index c978a3758c9..c56a5c9fbf2 100644 Binary files a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_complex_type.out and b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_complex_type.out differ diff --git a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_map_type.out b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_map_type.out index 95dce04daae..69ed41b9c02 100644 Binary files a/regression-test/data/export_p0/outfile/csv/test_outfile_csv_map_type.out and b/regression-test/data/export_p0/outfile/csv/test_outfile_csv_map_type.out differ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org