Airblader commented on a change in pull request #16691:
URL: https://github.com/apache/flink/pull/16691#discussion_r686661570



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/BaseExpressions.java
##########
@@ -1261,4 +1263,47 @@ public OutType sha2(InType hashLength) {
         return toApiSpecificExpression(
                 unresolvedCall(SHA2, toExpr(), 
objectToExpression(hashLength)));
     }
+
+    // JSON functions
+
+    /**
+     * Returns whether a JSON string satisfies a given search criterion.
+     *
+     * <p>The given JSON path follows the ISO9075-2 standard.
+     *
+     * <p>Examples:
+     *
+     * <pre>{@code
+     * $("f0").jsonExists("lax $.a.b[0].c", JsonExistsOnError.TRUE)
+     * }</pre>
+     *
+     * @param path JSON path to search for.
+     * @param onError Behavior in case of an error.
+     * @return {@code true} if the JSON string satisfies the search criterion.
+     */
+    public OutType jsonExists(String path, JsonExistsOnError onError) {

Review comment:
       Yes, the SQL standard defines that this must be a literal.
   
   > The context item is followed by a comma and the SQL/JSON path expression. 
<JSON path specification> is
   a character string literal. Requiring a literal enables the implementation 
to optimize the query by analyzing the
   SQL/JSON path expression and planning accordingly, for example, if there are 
indexes available on the JSON
   data.




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


Reply via email to