This is an automated email from the ASF dual-hosted git repository.
lide pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new d82ea941d5a [fix](json) fix be crash while load json data (#34283)
(#34347)
d82ea941d5a is described below
commit d82ea941d5ab2166da42631e9899e9b18a230fc8
Author: camby <[email protected]>
AuthorDate: Mon May 6 10:26:38 2024 +0800
[fix](json) fix be crash while load json data (#34283) (#34347)
---
be/src/vec/exec/format/json/new_json_reader.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 ff0d410757f..9946b29a663 100644
--- a/be/src/vec/exec/format/json/new_json_reader.cpp
+++ b/be/src/vec/exec/format/json/new_json_reader.cpp
@@ -384,7 +384,9 @@ Status
NewJsonReader::_vhandle_simple_json(std::vector<MutableColumnPtr>& column
objectValue = _json_doc;
}
_next_row = 0;
- if (_fuzzy_parse) {
+ // Here we expect the incoming `objectValue` to be a Json Object,
such as {"key" : "value"}
+ // If a Json Array comes here, it maybe crashed in
it->name.GetString()
+ if (_fuzzy_parse && objectValue->IsObject()) {
for (auto v : slot_descs) {
for (int i = 0; i < objectValue->MemberCount(); ++i) {
auto it = objectValue->MemberBegin() + i;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]