diff --git a/be/src/vec/exec/format/json/new_json_reader.cpp b/be/src/vec/exec/format/json/new_json_reader.cpp index b6d849eef46910..21b99ff9720547 100644 --- a/be/src/vec/exec/format/json/new_json_reader.cpp +++ b/be/src/vec/exec/format/json/new_json_reader.cpp @@ -774,8 +774,9 @@ Status NewJsonReader::_set_column_value(rapidjson::Value& objectValue, Block& bl } RETURN_IF_ERROR(_append_error_msg(objectValue, "There is no column matching jsonpaths in the json file, " - "columns:[{}], jsonpaths:{}, please check columns " - "and jsonpaths", + "columns:[{}], lease check columns " + "and jsonpaths:" + + _jsonpaths, col_names, valid)); return Status::OK(); } @@ -1345,8 +1346,9 @@ Status NewJsonReader::_simdjson_set_column_value(simdjson::ondemand::object* val } RETURN_IF_ERROR(_append_error_msg(value, "There is no column matching jsonpaths in the json file, " - "columns:[{}], jsonpaths:{}, please check columns " - "and jsonpaths", + "columns:[{}], please check columns " + "and jsonpaths:" + + _jsonpaths, col_names, valid)); return Status::OK(); } @@ -1660,8 +1662,9 @@ Status NewJsonReader::_simdjson_write_columns_by_jsonpath( } RETURN_IF_ERROR(_append_error_msg(value, "There is no column matching jsonpaths in the json file, " - "columns:[{}], jsonpaths:{}, please check columns " - "and jsonpaths", + "columns:[{}], please check columns " + "and jsonpaths:" + + _jsonpaths, col_names, valid)); return Status::OK(); } diff --git a/regression-test/suites/load_p0/stream_load/test_json_load.groovy b/regression-test/suites/load_p0/stream_load/test_json_load.groovy index f5dc4d97c1b2b2..816765b12337f4 100644 --- a/regression-test/suites/load_p0/stream_load/test_json_load.groovy +++ b/regression-test/suites/load_p0/stream_load/test_json_load.groovy @@ -754,7 +754,7 @@ suite("test_json_load", "p0") { def code = process.waitFor() def out = process.text log.info("result: ${out}".toString()) - def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[name, age, agent_id, ], jsonpaths:[\"Name\", \"Age\", \"Agent_id\"], please check columns and jsonpaths. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n" + def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[name, age, agent_id, ], please check columns and jsonpaths:[\"Name\", \"Age\", \"Agent_id\"]. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n" assertEquals("${reason}", "${out}") } } @@ -790,7 +790,7 @@ suite("test_json_load", "p0") { def code = process.waitFor() def out = process.text log.info("result: ${out}".toString()) - def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[Name, Age, Agent_id, ], jsonpaths:, please check columns and jsonpaths. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n" + def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[Name, Age, Agent_id, ], please check columns and jsonpaths:. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n" assertEquals("${reason}", "${out}") } }