manikBS commented on code in PR #16910:
URL: https://github.com/apache/pinot/pull/16910#discussion_r2383528204


##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/JsonFunctions.java:
##########
@@ -323,6 +351,40 @@ public static Object jsonStringToListOrMap(String 
jsonString) {
     return null;
   }
 
+  @ScalarFunction
+  public static Object jsonExtractScalar(Object jsonInput, String jsonPath, 
String dataType) {
+    return jsonExtractScalar(jsonInput, jsonPath, dataType, null);
+  }
+
+  @ScalarFunction
+  public static Object jsonExtractScalar(Object jsonInput, String jsonPath, 
String dataType, Object defaultValue) {
+    try {
+      switch (dataType.toUpperCase()) {

Review Comment:
   I have tried to make it exactly similar to 
JsonExtractScalarTransformFunction. Can you please verify?



-- 
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