klsince commented on a change in pull request #7208:
URL: https://github.com/apache/pinot/pull/7208#discussion_r677946848
##########
File path:
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/JsonFunctions.java
##########
@@ -199,4 +207,47 @@ public static double jsonPathDouble(Object object, String
jsonPath, double defau
return defaultValue;
}
}
+
+ static class ArrayAwareJacksonJsonProvider extends JacksonJsonProvider {
+ @Override
+ public boolean isArray(Object obj) {
+ return (obj instanceof List) || (obj instanceof Object[]);
+ }
+
+ @Override
+ public Object getArrayIndex(Object obj, int idx) {
+ if (obj instanceof Object[]) {
+ return ((Object[]) obj)[idx];
+ }
+ return super.getArrayIndex(obj, idx);
+ }
+
+ @Override
+ public void setArrayIndex(Object obj, int index, Object newValue) {
Review comment:
looks like it's mainly for updating JSON object, like adding or setting
a value at certain json path. Don't think it's needed for here, removing for
now.
--
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]