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 2021/04/16 13:54:58 UTC

[GitHub] [shardingsphere] huanghao495430759 opened a new pull request #10116: refactor AbstractSQLBuilder

huanghao495430759 opened a new pull request #10116:
URL: https://github.com/apache/shardingsphere/pull/10116


   Fixes #9510 .
   
   - refactor AbstractSQLBuilder, extract sub SQLToken from ComposableSQLToken before executeSQL build.
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] huanghao495430759 closed pull request #10116: refactor AbstractSQLBuilder

Posted by GitBox <gi...@apache.org>.
huanghao495430759 closed pull request #10116:
URL: https://github.com/apache/shardingsphere/pull/10116


   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #10116: refactor AbstractSQLBuilder

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #10116:
URL: https://github.com/apache/shardingsphere/pull/10116#discussion_r615183626



##########
File path: shardingsphere-infra/shardingsphere-infra-rewrite/shardingsphere-infra-rewrite-engine/src/main/java/org/apache/shardingsphere/infra/rewrite/sql/impl/AbstractSQLBuilder.java
##########
@@ -17,49 +17,53 @@
 
 package org.apache.shardingsphere.infra.rewrite.sql.impl;
 
-import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.infra.rewrite.context.SQLRewriteContext;
 import org.apache.shardingsphere.infra.rewrite.sql.SQLBuilder;
 import org.apache.shardingsphere.infra.rewrite.sql.token.pojo.SQLToken;
 import org.apache.shardingsphere.infra.rewrite.sql.token.pojo.Substitutable;
 import org.apache.shardingsphere.infra.rewrite.sql.token.pojo.generic.ComposableSQLToken;
 
 import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
 
 /**
  * Abstract SQL builder.
  */
-@RequiredArgsConstructor
 public abstract class AbstractSQLBuilder implements SQLBuilder {
     
     private final SQLRewriteContext context;
     
+    private final List<SQLToken> sqlTokens = new LinkedList<>();

Review comment:
       What is diff of `context.getSqlTokens()` and `sqlTokens`?
   Should we just keep only one way to access sqlTokens?




-- 
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:
users@infra.apache.org