diff --git a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 index 5ec767a8868e4..1d1ca80e835fa 100644 --- a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 +++ b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 @@ -4144,3 +4144,4 @@ datafileSpecClause createProfile : CREATE MANDATORY? PROFILE profileName LIMIT (resourceParameters | passwordParameters)+ (CONTAINER EQ_ (CURRENT | ALL))? ; + diff --git a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4 b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4 index a01bf3bb14855..79d5e31517f25 100644 --- a/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4 +++ b/parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/OracleKeyword.g4 @@ -7745,5 +7745,5 @@ DB_RECOVERY_FILE_DEST_SIZE ; MANDATORY - : M A N D A T O R Y - ; \ No newline at end of file + : M A N D A T O R Y + ; diff --git a/parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDDLStatementVisitor.java b/parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDDLStatementVisitor.java index 798554918aac0..35cf88cca759f 100644 --- a/parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDDLStatementVisitor.java +++ b/parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDDLStatementVisitor.java @@ -1353,13 +1353,12 @@ public ASTNode visitCreateJava(final CreateJavaContext ctx) { public ASTNode visitCreateLibrary(final CreateLibraryContext ctx) { return new OracleCreateLibraryStatement(); } - + @Override public ASTNode visitSwitch(final SwitchContext ctx) { return new OracleSwitchStatement(); } - - + @Override public ASTNode visitCreateProfile(final CreateProfileContext ctx) { return new OracleCreateProfileStatement(); diff --git a/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java b/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java index 9913d769133de..66345c7e728f1 100644 --- a/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java +++ b/parser/sql/engine/src/main/java/org/apache/shardingsphere/sql/parser/core/database/visitor/SQLVisitorRule.java @@ -700,9 +700,9 @@ public enum SQLVisitorRule { PLSQL_BLOCK("PlsqlBlock", SQLStatementType.DDL), CREATE_LIBRARY("CreateLibrary", SQLStatementType.DDL), - + SWITCH("Switch", SQLStatementType.DDL), - + CREATE_PROFILE("CreateProfile", SQLStatementType.DDL); private final String name; diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java index 978cb53e79876..2374134bcde5e 100644 --- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java +++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/RootSQLParserTestCases.java @@ -1724,10 +1724,10 @@ public final class RootSQLParserTestCases { @XmlElement(name = "switch") private final List switchStatementTestCases = new LinkedList<>(); - + @XmlElement(name = "create-profile") private final List createProfileStatementTestCases = new LinkedList<>(); - + /** * Get all SQL parser test cases. *