deniskuzZ commented on code in PR #6144:
URL: https://github.com/apache/hive/pull/6144#discussion_r2495034880


##########
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java:
##########
@@ -239,11 +239,12 @@ private Object extract(Object json, String path, boolean 
skipMapProc) {
       indexListCache.put(path, indexList);
     }
 
-    if (indexList.size() > 0) {
-      json = extract_json_withindex(json, indexList);
+    if (indexList.isEmpty()) {
+      // Return null if index is invalid.
+      return path.contains("[") ? null : json;

Review Comment:
   why do we need to check path?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to