From 4caa6f9b33bdcf3c211ae8f9f55329a0d4855cdc Mon Sep 17 00:00:00 2001 From: HuangWei Date: Sat, 12 Sep 2020 16:04:21 +0800 Subject: [PATCH] [Bug] fix get_parsed_paths() subscript out of range (#4585) --- be/src/exprs/json_functions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/be/src/exprs/json_functions.cpp b/be/src/exprs/json_functions.cpp index 2d9985a696..86d1f1215c 100644 --- a/be/src/exprs/json_functions.cpp +++ b/be/src/exprs/json_functions.cpp @@ -371,6 +371,9 @@ void JsonFunctions::parse_json_paths( void JsonFunctions::get_parsed_paths( const std::vector& path_exprs, std::vector* parsed_paths) { + if(path_exprs.empty()){ + return; + } if (path_exprs[0] != "$") { parsed_paths->emplace_back("", -1, false);