amorynan commented on code in PR #37176: URL: https://github.com/apache/doris/pull/37176#discussion_r1664981052
########## be/src/vec/data_types/serde/data_type_string_serde.h: ########## @@ -73,16 +73,52 @@ class DataTypeStringSerDeBase : public DataTypeSerDe { auto result = check_column_const_set_readability(column, row_num); ColumnPtr ptr = result.first; row_num = result.second; + const auto& value = assert_cast<const ColumnType&>(*ptr).get_data_at(row_num); if (_nesting_level > 1) { bw.write('"'); } - - const auto& value = assert_cast<const ColumnType&>(*ptr).get_data_at(row_num); - bw.write(value.data, value.size); + if constexpr (std::is_same_v<ColumnType, ColumnString>) { + if (options.escape_char != 0) { + // we should make deal with some special characters in json str if we have escape_char + StringRef str_ref = value; + for (char it : str_ref) { Review Comment: done! -- 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