xiaokang commented on code in PR #38213: URL: https://github.com/apache/doris/pull/38213#discussion_r1690951663
########## be/src/vec/exec/format/json/new_json_reader.cpp: ########## @@ -1657,7 +1657,19 @@ Status NewJsonReader::_simdjson_write_columns_by_jsonpath( return st; } } - if (i >= _parsed_jsonpaths.size() || st.is<NOT_FOUND>()) { + if (i < _parsed_jsonpaths.size() && JsonFunctions::is_root_path(_parsed_jsonpaths[i])) { + // Indicate that the jsonpath is "$.", read the full root json object, insert the original doc directly Review Comment: Does this feature, that load all fields in JSON to variant column, match the need for users? I think usually users only need some fields in JSON, not all fields. ########## regression-test/data/load_p0/stream_load/test_json_load.out: ########## @@ -250,3 +250,9 @@ test k2_value -- !select29 -- 10 \N + +-- !select30 -- +12345 {"k1":12345,"k2":"11111","k3":111111,"k4":[11111]} {"k1":12345,"k2":"11111","k3":111111,"k4":[11111]} 111111 +12346 {"k1":12346,"k2":"22222","k4":[22222]} {"k1":12346,"k2":"22222","k4":[22222]} \N +12347 {"k1":12347,"k3":"33333","k5":{"k51":1024,"xxxx":[11111]}} {"k1":12347,"k3":"33333","k5":{"k51":1024,"xxxx":[11111]}} 33333 +12347 {"k1":12347,"k3":"33333","k4":[22222]} {"k1":12347,"k3":"33333","k4":[22222]} 33333 Review Comment: unstable output since k1 is the same for row 3 and 4. -- 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