sanpwc commented on code in PR #1902:
URL: https://github.com/apache/ignite-3/pull/1902#discussion_r1158418721


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -347,4 +349,20 @@ public static DistributionZoneConfiguration 
getZoneById(DistributionZonesConfigu
 
         throw new DistributionZoneNotFoundException(zoneId);
     }
+
+    /**
+     * Check if a passed filter is a valid {@link JsonPath} query.
+     *
+     * @param filter Filter.
+     * @return {@code true} if the passed filter is a valid filter, {@code 
false} otherwise.
+     */
+    public static boolean validate(String filter) {
+        try {
+            JsonPath.compile(filter);
+        } catch (InvalidPathException ignored) {

Review Comment:
   What about validation details? It's useful to propagate validation details 
to the user.



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