From e8f0c50314141a785d1400b697bf9e44b525a4f0 Mon Sep 17 00:00:00 2001 From: Mryange <2319153948@qq.com> Date: Mon, 26 Aug 2024 20:05:53 +0800 Subject: [PATCH 1/2] fix --- be/src/util/jsonb_parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/util/jsonb_parser.h b/be/src/util/jsonb_parser.h index 1591fa563c788a..d00a0731ce4cb6 100644 --- a/be/src/util/jsonb_parser.h +++ b/be/src/util/jsonb_parser.h @@ -370,7 +370,7 @@ class JsonbParserT { } } - if (!in.good() || in.peek() != '"' || key_len == 0) { + if (!in.good() || in.peek() != '"') { if (key_len == JsonbKeyValue::sMaxKeyLen) err_ = JsonbErrType::E_INVALID_KEY_LENGTH; else From 7a789bbd692adb5f639f09be3f8cd37eee747b37 Mon Sep 17 00:00:00 2001 From: Mryange <2319153948@qq.com> Date: Mon, 26 Aug 2024 20:42:30 +0800 Subject: [PATCH 2/2] upd --- be/src/util/jsonb_parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/util/jsonb_parser.h b/be/src/util/jsonb_parser.h index d00a0731ce4cb6..c90012a4fbef30 100644 --- a/be/src/util/jsonb_parser.h +++ b/be/src/util/jsonb_parser.h @@ -369,7 +369,7 @@ class JsonbParserT { key[key_len++] = ch; } } - + // The JSON key can be an empty string. if (!in.good() || in.peek() != '"') { if (key_len == JsonbKeyValue::sMaxKeyLen) err_ = JsonbErrType::E_INVALID_KEY_LENGTH;