Navya-Kumar commented on code in PR #13581:
URL: https://github.com/apache/pinot/pull/13581#discussion_r1683291565
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/MapFunctions.java:
##########
@@ -0,0 +1,67 @@
+package org.apache.pinot.common.function.scalar;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.pinot.spi.annotations.ScalarFunction;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class MapFunctions {
+ private MapFunctions() {
+ }
+
+ /**
+ * Internal Helper Function to convert Json String Values to Java Maps
+ * @param jsonString
+ * @return converted Java Map from JSON String
+ */
+ public static Map stringToMap(String jsonString) {
Review Comment:
Redid implementation with a LinkedHashMap, is this function still usable? I
further noticed that jsonUtils' jsonNodeToMap takes in a JSON Object whereas
this new implementation is string based, do you have any thoughts on to still
use jsonNodeToMap() or maybe add in a function there that takes string-based
input?
--
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]