From ef921ddb4a00b0af2d89bb7fcc37391692b7176e Mon Sep 17 00:00:00 2001 From: lancelly <1435078631@qq.com> Date: Wed, 18 Oct 2023 10:37:44 +0800 Subject: [PATCH] fix --- .../type/OracleDDLStatementVisitor.java | 4 +-- .../core/database/visitor/SQLVisitorRule.java | 2 +- .../oracle/ddl/OraclePLSQLBlockStatement.java | 25 +++++++++---------- 3 files changed, 15 insertions(+), 16 deletions(-) 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 3f78d5245f308..31cdd381674ac 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 @@ -1242,12 +1242,12 @@ public ASTNode visitAlterPluggableDatabase(final AlterPluggableDatabaseContext c public ASTNode visitCreateProcedure(final CreateProcedureContext ctx) { return new OracleCreateProcedureStatement(); } - + @Override public ASTNode visitPlsqlBlock(final PlsqlBlockContext ctx) { return new OraclePLSQLBlockStatement(); } - + @Override public ASTNode visitAlterProcedure(final AlterProcedureContext ctx) { return new OracleAlterProcedureStatement(); 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 5cbde16fa6bc9..6fbab21d92425 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 @@ -696,7 +696,7 @@ public enum SQLVisitorRule { EMPTY_STATEMENT("EmptyStatement", SQLStatementType.DAL), CREATE_JAVA("CreateJava", SQLStatementType.DDL), - + PLSQL_BLOCK("PlsqlBlock", SQLStatementType.DDL); private final String name; diff --git a/parser/sql/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OraclePLSQLBlockStatement.java b/parser/sql/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OraclePLSQLBlockStatement.java index 652c91338435b..589523db17758 100644 --- a/parser/sql/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OraclePLSQLBlockStatement.java +++ b/parser/sql/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OraclePLSQLBlockStatement.java @@ -1,20 +1,18 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl; @@ -22,6 +20,7 @@ import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement; public final class OraclePLSQLBlockStatement implements OracleStatement { + @Override public int getParameterCount() { return 0;