You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "galaxylqx (via GitHub)" <gi...@apache.org> on 2023/04/15 10:37:59 UTC

[GitHub] [shardingsphere] galaxylqx opened a new pull request, #25180: Support SQL non-parsing, transparent transmission mode

galaxylqx opened a new pull request, #25180:
URL: https://github.com/apache/shardingsphere/pull/25180

   Fixes #ISSUSE_ID.
   
   Changes proposed in this pull request:
     - Support SQL non-parsing, transparent transmission mode
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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] terrymanu commented on a diff in pull request #25180: Support SQL non-parsing, transparent transmission mode

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on code in PR #25180:
URL: https://github.com/apache/shardingsphere/pull/25180#discussion_r1168919158


##########
kernel/parser/distsql/handler/src/main/java/org/apache/shardingsphere/parser/distsql/handler/update/AlterSQLParserRuleStatementUpdater.java:
##########
@@ -40,7 +40,7 @@ public SQLParserRuleConfiguration buildAlteredRuleConfiguration(final SQLParserR
         CacheOption sqlStatementCache =
                 null == sqlStatement.getSqlStatementCache() ? currentRuleConfig.getSqlStatementCache()
                         : createCacheOption(currentRuleConfig.getSqlStatementCache(), sqlStatement.getSqlStatementCache());
-        return new SQLParserRuleConfiguration(sqlCommentParseEnabled, parseTreeCache, sqlStatementCache);
+        return new SQLParserRuleConfiguration(sqlCommentParseEnabled, parseTreeCache, sqlStatementCache, "Standard");

Review Comment:
   Please add `// TODO with reason` to reminder it fix in future



##########
kernel/parser/api/src/main/java/org/apache/shardingsphere/parser/config/SQLParserRuleConfiguration.java:
##########
@@ -34,4 +34,6 @@ public final class SQLParserRuleConfiguration implements GlobalRuleConfiguration
     private final CacheOption parseTreeCache;
     
     private final CacheOption sqlStatementCache;
+    
+    private final String engineType;

Review Comment:
   Please add default value for engineType. It is better to add a compatible constructor.



##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/SimpleSQLStatement.java:
##########
@@ -17,10 +17,12 @@
 
 package org.apache.shardingsphere.sql.parser.sql.common.statement;
 
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.MySQLStatement;
+
 /**
  * Simple SQL statement.
  */
-public final class SimpleSQLStatement implements SQLStatement {
+public final class SimpleSQLStatement implements MySQLStatement {

Review Comment:
   How about rename it as `MySQLSimpleSQLStatement` and create real `SimpleSQLStatement`?



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