You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/15 08:21:04 UTC

[GitHub] [shardingsphere] lanchengx opened a new issue #15414: Plan to refactor RAL's executor

lanchengx opened a new issue #15414:
URL: https://github.com/apache/shardingsphere/issues/15414


   Hi community,
   
   this issue is to refactor RAL's executors;
   
   **current structure**
   
   There are two types of RAL syntax, `advance` and `common`.
   `common` is further divided into `set`, `show`, `hint`, `alter`, `drop` and `create` types. Among them, `set`, `show`, `hint` have their own subclasses. details as follows:
   ```shell
   ├── ral
   │    ├── common
   │    │      ├── alter
   │    │      │     ├── executor
   │    │      │     │      ├── AlterSQLParserRuleExecutor.java
   │    │      │     │      ├── AlterTrafficRuleExecutor.java
   │    │      │     │      ├── AlterTransactionRuleExecutor.java
   │    │      │     ├── AlterStatementExecutorFactory.java
   │    │      │     ├── AlterStatementExecutor.java
   │    │      ├── create
   │    │      ├── hint
   │    │      ├── set
   │    │      ├── show
   │    │      ├── drop
   │    │      ├── AlterDistSQLBackendHandler.java
   │    │      ├── CommonDistSQLBackendHandlerFactory.java
   │    │      ├── HintDistSQLBackendHandler.java
   │    │      ├── RefreshTableMetadataHandler.java
   │    │      ├── SetDistSQLBackendHandler.java
   │    │      ├── ShowDistSQLBackendHandler.java
   │    ├── advance
   │    │      ├── PreviewDistSQLBackendHandler.java
   │    │      ├── ParseDistSQLBackendHandler.java
   │    │      ├── ......
   │    ├── RALBackendHandlerFactory.java
   ```
   
   Under this structure, there are the following two problems
   
   - The categories in `common` overlap
   - The code level is too deep
   
   In addition, coding in the executor of the RAL query syntax is more complex than in RQL, so it also needs to be optimized.
   
   
   **optimized structure**
   
   The RAL syntax is divided into two types: `advance` and `common` by the package name, and the actual code implements the two categories of `updatable` and `queryable`, details as follows:
   
   ```shell
   ├── ral
   │    ├── common
   │    │      ├── AlterTrafficRuleHandler.java
   │    │      ├── SetInstanceStatusHandler.java
   │    │      ├── ShowAuthorityRuleHandler.java
   │    │      ├── ......
   │    ├── advance
   │    │      ├── PreviewDistSQLBackendHandler.java
   │    │      ├── ParseDistSQLBackendHandler.java
   │    │      ├── ......
   │    ├── UpdatableRALBackendHandler.java
   │    ├── QueryableRALBackendHandler.java
   │    ├── RALBackendHandler.java
   │    ├── RALBackendHandlerFactory.java
   
   
   
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] lanchengx closed issue #15414: Plan to refactor RAL's executor

Posted by GitBox <gi...@apache.org>.
lanchengx closed issue #15414:
URL: https://github.com/apache/shardingsphere/issues/15414


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] lanchengx commented on issue #15414: Plan to refactor RAL's executor

Posted by GitBox <gi...@apache.org>.
lanchengx commented on issue #15414:
URL: https://github.com/apache/shardingsphere/issues/15414#issuecomment-1047550133


   Refactoring complete


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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