You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Minghui Liu (Jira)" <ji...@apache.org> on 2023/03/09 03:29:00 UTC

[jira] [Created] (IOTDB-5649) Refactor ExpressionAnalyzer using visitor pattern

Minghui Liu created IOTDB-5649:
----------------------------------

             Summary: Refactor ExpressionAnalyzer using visitor pattern
                 Key: IOTDB-5649
                 URL: https://issues.apache.org/jira/browse/IOTDB-5649
             Project: Apache IoTDB
          Issue Type: Improvement
            Reporter: Minghui Liu
            Assignee: Minghui Liu
             Fix For: master branch


ExpressionAnalyzer is the class in charge of handling expressions.

Each method in this class has different ability, such as searchSourceExpressions() finds out which sources the expression contains, removeWildcardInExpression() remove * from expression, and so on.

There were some redundant logic in ExpressionAnalyzer's methods. To make it easier to add new kinds of expressions, it's necessary to simplify.

After analyze the similarity between these methods, I believe the visitor pattern is a good way to make it simple. The same logic can be contained in superclass-visitor, and the difference can be implemented by subclass-visitor's override.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)