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 2020/04/17 08:04:13 UTC

[GitHub] [incubator-shardingsphere] jingshanglu commented on a change in pull request #5206: Simplify the SelectStatement

jingshanglu commented on a change in pull request #5206: Simplify the SelectStatement
URL: https://github.com/apache/incubator-shardingsphere/pull/5206#discussion_r410058969
 
 

 ##########
 File path: encrypt-core/encrypt-core-rewrite/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptProjectionTokenGenerator.java
 ##########
 @@ -51,14 +53,15 @@
     
     @Override
     protected boolean isGenerateSQLTokenForEncrypt(final SQLStatementContext sqlStatementContext) {
-        return sqlStatementContext instanceof SelectStatementContext && !((SelectStatementContext) sqlStatementContext).getSqlStatement().getSimpleTableSegments().isEmpty();
+        SQLStatement sqlStatement = sqlStatementContext.getSqlStatement();
+        return sqlStatementContext instanceof SelectStatementContext && !((SelectStatementContext) sqlStatementContext).getSimpleTableSegments((SelectStatement) sqlStatement).isEmpty();
 
 Review comment:
   What do you mean? @tristaZero 

----------------------------------------------------------------
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


With regards,
Apache Git Services