From 5d627e41a4bc321faa9373b6772a778a7ba112d8 Mon Sep 17 00:00:00 2001 From: carlvinhust2012 Date: Wed, 24 Aug 2022 08:51:12 +0800 Subject: [PATCH] [fix](array-type) fix the be core dump when import number larger than uint64 (#11853) Co-authored-by: hucheng01 --- be/src/util/array_parser.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/be/src/util/array_parser.h b/be/src/util/array_parser.h index bbdf2571f0..29d90ff1e6 100644 --- a/be/src/util/array_parser.h +++ b/be/src/util/array_parser.h @@ -171,7 +171,13 @@ private: case TYPE_LARGEINT: { __int128 value = 0; if (iterator->IsNumber()) { - value = iterator->GetUint64(); + if (iterator->IsUint64()) { + value = iterator->GetUint64(); + } else { + return Status::RuntimeError( + "rapidjson can't parse the number larger than Uint64, please use " + "String to parse as LARGEINT"); + } } else { std::string_view view(iterator->GetString(), iterator->GetStringLength()); std::stringstream stream;