michaelmior commented on a change in pull request #1067: [CALCITE-2864]Add the
JSON_DEPTH function
URL: https://github.com/apache/calcite/pull/1067#discussion_r260360783
##########
File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
##########
@@ -2712,6 +2714,48 @@ public static String jsonType(Object o) {
}
}
+ public static Integer jsonDepth(Object o) {
+ final Integer result;
+ try {
+ if (o == null) {
+ result = null;
+ } else {
+ result = getJsonDepth(o);
+ }
+ return result;
+ } catch (Exception ex) {
+ throw RESOURCE.unknownObjectOfJsonDepth(o.toString()).ex();
+ }
+ }
+
+ public static Integer getJsonDepth(Object o) {
Review comment:
It looks like this function should be private as it's only used by
`jsonDepth` above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services