Jackie-Jiang commented on a change in pull request #4216: PQL -> SQL enhancement - phase 1 - new Pinot Query Struct URL: https://github.com/apache/incubator-pinot/pull/4216#discussion_r290995596
########## File path: pinot-common/src/main/java/org/apache/pinot/common/request/transform/TransformExpressionTree.java ########## @@ -75,34 +104,27 @@ public static String getStandardExpression(AstNode astNode) { } } - // Enum for expression represented by the tree. - public enum ExpressionType { - FUNCTION, IDENTIFIER, LITERAL - } - - private final ExpressionType _expressionType; - private final String _value; - private final List<TransformExpressionTree> _children; - - public TransformExpressionTree(AstNode root) { - if (root instanceof FunctionCallAstNode) { - _expressionType = ExpressionType.FUNCTION; - _value = ((FunctionCallAstNode) root).getName().toLowerCase(); - _children = new ArrayList<>(); - for (AstNode child : root.getChildren()) { - _children.add(new TransformExpressionTree(child)); + public static Expression getExpression(AstNode astNode) { Review comment: Please add javadoc for this method, and list all types of AstNode it can handle. Also, to me this method does not belong to transform only. It can handle all expressions right? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org