From 0517feb3ab6d009522d45b8202aae1b537d95961 Mon Sep 17 00:00:00 2001 From: Charles Givre Date: Tue, 13 Aug 2024 10:19:07 -0400 Subject: [PATCH] DRILL-8506: Ignore JSON Elements with Empty Keys --- .../drill/exec/store/easy/json/parser/ObjectParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/parser/ObjectParser.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/parser/ObjectParser.java index ad405c16417..a5787f85b0c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/parser/ObjectParser.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/parser/ObjectParser.java @@ -238,8 +238,8 @@ private void parseMember(TokenIterator tokenizer) { */ private ElementParser detectValueParser(String key, TokenIterator tokenizer) { if (key.isEmpty()) { - throw errorFactory().structureError( - "Drill does not allow empty keys in JSON key/value pairs"); + logger.warn("Ignoring empty key: {}", key); + return DummyValueParser.INSTANCE; } ElementParser fieldParser = onField(key, tokenizer); if (fieldParser == null) {