From ccb7ba9dccca2861d22de24c8628609b09618990 Mon Sep 17 00:00:00 2001 From: zhli1142015 Date: Thu, 9 Jan 2025 12:34:45 +0800 Subject: [PATCH] minor change --- velox/functions/sparksql/specialforms/FromJson.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox/functions/sparksql/specialforms/FromJson.cpp b/velox/functions/sparksql/specialforms/FromJson.cpp index 0edc8f1e4b4b..c955b3617c71 100644 --- a/velox/functions/sparksql/specialforms/FromJson.cpp +++ b/velox/functions/sparksql/specialforms/FromJson.cpp @@ -232,7 +232,7 @@ struct ExtractJsonTypeImpl { boost::algorithm::to_lower(key); } auto it = fieldIndices.find(key); - if (it != fieldIndices.end()) { + if (it != fieldIndices.end() && it->second >= 0) { const auto index = it->second; it->second = -1;