eldenmoon commented on code in PR #11880:
URL: https://github.com/apache/doris/pull/11880#discussion_r948590545
##########
be/src/vec/exec/vjson_scanner.cpp:
##########
@@ -627,16 +633,17 @@ Status
VSIMDJsonReader::_set_column_value(simdjson::ondemand::value objectValue,
if (objectValue.type() != simdjson::ondemand::json_type::object) {
// Here we expect the incoming `objectValue` to be a Json Object, such
as {"key" : "value"},
// not other type of Json format.
- RETURN_IF_ERROR(_append_error_msg(objectValue, "Expect json object
value", "", valid));
+ RETURN_IF_ERROR(_append_error_msg("Expect json object value", "",
valid));
return Status::OK();
}
auto object_val = objectValue.get_object();
size_t cur_row_count = block.rows();
// iterate through object, simdjson::ondemond will parsing on the fly
for (auto field : object_val) {
- std::string key(field.unescaped_key().value());
- auto column_type_and_name = block.try_get_by_name(key);
+ std::string_view key;
Review Comment:
field.unescaped_key().get(key) will initialize key,which is get(T& )
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]