You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2023/04/17 15:39:05 UTC
[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #25180: Support SQL non-parsing, transparent transmission mode
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