You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/01 10:04:25 UTC

[GitHub] [incubator-doris] morningman commented on a diff in pull request #9895: [Enhancement](DOE) Step1: Fe generates the DSL and is used to explain

morningman commented on code in PR #9895:
URL: https://github.com/apache/incubator-doris/pull/9895#discussion_r886625429


##########
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/EsUtil.java:
##########
@@ -87,12 +105,134 @@ public static JSONObject getJsonObject(JSONObject jsonObject, String key, int fr
         }
     }
 
+    /**
+     * Wrapper for get boolean value.
+     **/
     public static boolean getBoolean(Map<String, String> properties, String name) throws DdlException {
         String property = properties.get(name).trim();
         try {
             return Boolean.parseBoolean(property);
         } catch (Exception e) {
-            throw new DdlException(String.format("fail to parse %s, %s = %s, `%s` should be like 'true' or 'false', value should be double quotation marks", name, name, property, name));
+            throw new DdlException(String.format("fail to parse %s, %s = %s, `%s` should be like 'true' or 'false', "
+                    + "value should be double quotation marks", name, name, property, name));
+        }
+    }
+
+    /**
+     * Doris expr to es dsl.
+     **/
+    public static QueryBuilder convertToEsDsl(Expr expr) {

Review Comment:
   Not familiar with Es DSL, but maybe we should add some unit test for this.



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org