You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/06/14 07:26:14 UTC

[GitHub] [calcite] XuQianJin-Stars commented on a change in pull request #1955: [CALCITE-3941] Add the default strict mode to the path in the Json functions

XuQianJin-Stars commented on a change in pull request #1955:
URL: https://github.com/apache/calcite/pull/1955#discussion_r439800394



##########
File path: core/src/main/java/org/apache/calcite/runtime/JsonFunctions.java
##########
@@ -112,18 +113,22 @@ public static JsonPathContext jsonApiCommonSyntax(String input, String pathSpec)
   }
 
   public static JsonPathContext jsonApiCommonSyntax(JsonValueContext input, String pathSpec) {
+    PathMode mode;
+    String pathWff;
     try {
       Matcher matcher = JSON_PATH_BASE.matcher(pathSpec);
       if (!matcher.matches()) {
-        throw RESOURCE.illegalJsonPathSpec(pathSpec).ex();
+        mode = PathMode.STRICT;
+        pathWff = pathSpec;

Review comment:
       > false on error
   
   The exception was handled and returned as false.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org