Skip to content

Commit

Permalink
fix core with function json_quote
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan committed Aug 27, 2024
1 parent db2a8f9 commit 8e4ae75
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/vec/functions/function_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,13 @@ struct FunctionJsonQuoteImpl {
rapidjson::Value value;

rapidjson::StringBuffer buf;
rapidjson::Writer<rapidjson::StringBuffer> writer(buf);

for (int i = 0; i < input_rows_count; i++) {
StringRef data = data_columns[0]->get_data_at(i);
value.SetString(data.data, data.size, allocator);

buf.Clear();
rapidjson::Writer<rapidjson::StringBuffer> writer(buf);
value.Accept(writer);
result_column.insert_data(buf.GetString(), buf.GetSize());
}
Expand Down
Loading

0 comments on commit 8e4ae75

Please sign in to comment.