From f440f808c0dff0690807d2a3ac0896f670e1ea29 Mon Sep 17 00:00:00 2001 From: LotusMoon Date: Thu, 28 Dec 2023 11:19:22 +0800 Subject: [PATCH] remove sqlCommentParseEnabled config in test case --- .../reflect-config.json | 4 ++-- .../parser/src/main/antlr4/imports/parser/RALStatement.g4 | 4 ---- .../test/resources/env/common/cluster/proxy/conf/server.yaml | 1 - .../resources/env/common/standalone/proxy/conf/server.yaml | 1 - .../resources/env/scenario/db/proxy/mode/cluster/server.yaml | 1 - .../env/scenario/db/proxy/mode/standalone/server.yaml | 1 - .../db_tbl_sql_federation/proxy/mode/cluster/server.yaml | 1 - .../db_tbl_sql_federation/proxy/mode/standalone/server.yaml | 1 - .../proxy/mode/cluster/server.yaml | 1 - .../proxy/mode/standalone/server.yaml | 1 - .../proxy/mode/cluster/server.yaml | 1 - .../proxy/mode/standalone/server.yaml | 1 - .../env/scenario/empty_rules/proxy/mode/cluster/server.yaml | 1 - .../scenario/empty_rules/proxy/mode/standalone/server.yaml | 1 - .../env/scenario/tbl/proxy/conf/mysql/config-tbl.yaml | 3 --- .../resources/env/scenario/tbl/proxy/mode/cluster/server.yaml | 1 - .../env/scenario/tbl/proxy/mode/standalone/server.yaml | 1 - test/e2e/sql/src/test/resources/env/scenario/tbl/rules.yaml | 3 --- .../jaxb/segment/impl/distsql/ExpectedSQLParserRule.java | 4 ---- .../src/test/resources/test-native/yaml/features/shadow.yaml | 1 - 20 files changed, 2 insertions(+), 31 deletions(-) diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json index 30b31e56e233d..a3737a72f055e 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json @@ -565,7 +565,7 @@ "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfiguration", "allDeclaredFields":true, "queryAllPublicMethods":true, - "methods":[{"name":"","parameterTypes":[] }, {"name":"setParseTreeCache","parameterTypes":["org.apache.shardingsphere.parser.yaml.config.YamlSQLParserCacheOptionRuleConfiguration"] }, {"name":"setSqlCommentParseEnabled","parameterTypes":["boolean"] }, {"name":"setSqlStatementCache","parameterTypes":["org.apache.shardingsphere.parser.yaml.config.YamlSQLParserCacheOptionRuleConfiguration"] }] + "methods":[{"name":"","parameterTypes":[] }, {"name":"setParseTreeCache","parameterTypes":["org.apache.shardingsphere.parser.yaml.config.YamlSQLParserCacheOptionRuleConfiguration"] }, {"name":"setSqlStatementCache","parameterTypes":["org.apache.shardingsphere.parser.yaml.config.YamlSQLParserCacheOptionRuleConfiguration"] }] }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.shortcut.YamlRuleConfigurationShortcuts"}, @@ -575,7 +575,7 @@ "condition":{"typeReachable":"org.apache.shardingsphere.parser.yaml.swapper.NewYamlSQLParserRuleConfigurationSwapper"}, "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfiguration", "allDeclaredFields":true, - "methods":[{"name":"getParseTreeCache","parameterTypes":[] }, {"name":"getSqlStatementCache","parameterTypes":[] }, {"name":"isSqlCommentParseEnabled","parameterTypes":[] }] + "methods":[{"name":"getParseTreeCache","parameterTypes":[] }, {"name":"getSqlStatementCache","parameterTypes":[] }] }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"}, diff --git a/kernel/sql-parser/distsql/parser/src/main/antlr4/imports/parser/RALStatement.g4 b/kernel/sql-parser/distsql/parser/src/main/antlr4/imports/parser/RALStatement.g4 index 084917a9a25a5..0bf094e9ca846 100644 --- a/kernel/sql-parser/distsql/parser/src/main/antlr4/imports/parser/RALStatement.g4 +++ b/kernel/sql-parser/distsql/parser/src/main/antlr4/imports/parser/RALStatement.g4 @@ -39,10 +39,6 @@ sqlStatementCacheDefinition : SQL_STATEMENT_CACHE LP_ cacheOption RP_ ; -sqlCommentParseEnabled - : TRUE | FALSE - ; - cacheOption : (INITIAL_CAPACITY EQ_ initialCapacity)? (COMMA_? MAXIMUM_SIZE EQ_ maximumSize)? ; diff --git a/test/e2e/sql/src/test/resources/env/common/cluster/proxy/conf/server.yaml b/test/e2e/sql/src/test/resources/env/common/cluster/proxy/conf/server.yaml index ed22f88ac78f0..6464cd28fd79d 100644 --- a/test/e2e/sql/src/test/resources/env/common/cluster/proxy/conf/server.yaml +++ b/test/e2e/sql/src/test/resources/env/common/cluster/proxy/conf/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/common/standalone/proxy/conf/server.yaml b/test/e2e/sql/src/test/resources/env/common/standalone/proxy/conf/server.yaml index b5480bf36ed27..9d876870a19df 100644 --- a/test/e2e/sql/src/test/resources/env/common/standalone/proxy/conf/server.yaml +++ b/test/e2e/sql/src/test/resources/env/common/standalone/proxy/conf/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/cluster/server.yaml index 1b29517876f7b..d2e91bb212a87 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/standalone/server.yaml index 703d0cb49f28a..aef1f5d0d8e0f 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/db/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/cluster/server.yaml index bc029ccbce19d..f057c1ed4f380 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/standalone/server.yaml index 5dd5f627a1b7a..76789096ff4b0 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/db_tbl_sql_federation/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/cluster/server.yaml index 9a5fd67d4cff9..b443c588e8577 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/standalone/server.yaml index 703d0cb49f28a..aef1f5d0d8e0f 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/cluster/server.yaml index 9a5fd67d4cff9..b443c588e8577 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/standalone/server.yaml index 703d0cb49f28a..aef1f5d0d8e0f 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/dbtbl_with_readwrite_splitting_and_encrypt/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/cluster/server.yaml index 1b29517876f7b..d2e91bb212a87 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/standalone/server.yaml index 703d0cb49f28a..aef1f5d0d8e0f 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/empty_rules/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/conf/mysql/config-tbl.yaml b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/conf/mysql/config-tbl.yaml index 6086abd266486..1245c9e851c6a 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/conf/mysql/config-tbl.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/conf/mysql/config-tbl.yaml @@ -87,6 +87,3 @@ rules: tables: - t_broadcast_table - t_broadcast_table_for_ddl - -- !SQL_PARSER - sqlCommentParseEnabled: true diff --git a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/cluster/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/cluster/server.yaml index 1b29517876f7b..d2e91bb212a87 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/cluster/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/cluster/server.yaml @@ -35,7 +35,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/standalone/server.yaml b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/standalone/server.yaml index 703d0cb49f28a..aef1f5d0d8e0f 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/standalone/server.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/tbl/proxy/mode/standalone/server.yaml @@ -23,7 +23,6 @@ authority: type: ALL_PERMITTED sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 2000 maximumSize: 65535 diff --git a/test/e2e/sql/src/test/resources/env/scenario/tbl/rules.yaml b/test/e2e/sql/src/test/resources/env/scenario/tbl/rules.yaml index 6c20ca988771a..fa5344a63bcda 100644 --- a/test/e2e/sql/src/test/resources/env/scenario/tbl/rules.yaml +++ b/test/e2e/sql/src/test/resources/env/scenario/tbl/rules.yaml @@ -80,9 +80,6 @@ sqlFederation: executionPlanCache: initialCapacity: 2000 maximumSize: 65535 - -sqlParser: - sqlCommentParseEnabled: true props: sql-show: true diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedSQLParserRule.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedSQLParserRule.java index e571cc7672882..9ccc74e87d6d5 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedSQLParserRule.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/segment/impl/distsql/ExpectedSQLParserRule.java @@ -21,7 +21,6 @@ import lombok.Setter; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.AbstractExpectedIdentifierSQLSegment; -import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; /** @@ -31,9 +30,6 @@ @Setter public final class ExpectedSQLParserRule extends AbstractExpectedIdentifierSQLSegment { - @XmlAttribute(name = "sql-comment-parse-enabled") - private boolean sqlCommentParseEnabled; - @XmlElement(name = "parse-tree-cache") private ExpectedCacheOption parseTreeCache; diff --git a/test/native/src/test/resources/test-native/yaml/features/shadow.yaml b/test/native/src/test/resources/test-native/yaml/features/shadow.yaml index 9787e1da06424..3defd897e1a16 100644 --- a/test/native/src/test/resources/test-native/yaml/features/shadow.yaml +++ b/test/native/src/test/resources/test-native/yaml/features/shadow.yaml @@ -76,7 +76,6 @@ rules: defaultShadowAlgorithmName: sql-hint-algorithm sqlParser: - sqlCommentParseEnabled: true sqlStatementCache: initialCapacity: 128 maximumSize: 1024