You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/08/10 14:33:24 UTC

[GitHub] [shardingsphere] strongduanmu opened a new pull request #6771: support mysql store procedure create, alter, drop and call statement

strongduanmu opened a new pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771


   Ref #6498 .
   
   Changes proposed in this pull request:
   - support mysql store procedure create, alter, drop, call statement parse
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771#issuecomment-671790988


   Hi @strongduanmu 
   Thanks for your continued work. I believe many users will benefit from this PR!


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771#discussion_r468353415



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/ddl/DropProcedureStatement.java
##########
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.statement.ddl;
+
+/**
+ * Drop procedure statement.
+ */
+public final class DropProcedureStatement extends DDLStatement {
+    

Review comment:
       > This blank line is unnecessary, right?
   
   I will fix it.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771#discussion_r468353343



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/SQLStatementContextFactory.java
##########
@@ -110,6 +112,9 @@ private static SQLStatementContext getDMLStatementContext(final SchemaMetaData s
         if (sqlStatement instanceof InsertStatement) {
             return new InsertStatementContext(schemaMetaData, parameters, (InsertStatement) sqlStatement);
         }
+        if (sqlStatement instanceof CallStatement) {

Review comment:
       > CallStatement
   
   Yes, `CallStatement` belongs to `DMLStatement`.
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771#discussion_r468348131



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/SQLStatementContextFactory.java
##########
@@ -110,6 +112,9 @@ private static SQLStatementContext getDMLStatementContext(final SchemaMetaData s
         if (sqlStatement instanceof InsertStatement) {
             return new InsertStatementContext(schemaMetaData, parameters, (InsertStatement) sqlStatement);
         }
+        if (sqlStatement instanceof CallStatement) {

Review comment:
       Hi `CallStatement` belongs to `DMLStatement`, doesn't it?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/ddl/DropProcedureStatement.java
##########
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.statement.ddl;
+
+/**
+ * Drop procedure statement.
+ */
+public final class DropProcedureStatement extends DDLStatement {
+    

Review comment:
       This blank line is unnecessary, right?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls commented on pull request #6771: support mysql store procedure create, alter, drop and call statement

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #6771:
URL: https://github.com/apache/shardingsphere/pull/6771#issuecomment-675196110


   ## Pull Request Test Coverage Report for [Build 13673](https://coveralls.io/builds/32668538)
   
   * **3** of **11**   **(27.27%)**  changed or added relevant lines in **5** files are covered.
   * **9** unchanged lines in **2** files lost coverage.
   * Overall coverage increased (+**0.3%**) to **57.013%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/ddl/DropProcedureStatement.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fstatement%2Fddl%2FDropProcedureStatement.java#L23) | 0 | 1 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/SQLStatementContextFactory.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2FSQLStatementContextFactory.java#L115) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/statement/dml/CallStatementContext.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fstatement%2Fdml%2FCallStatementContext.java#L30) | 0 | 2 | 0.0%
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDDLVisitor.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDDLVisitor.java#L423) | 0 | 3 | 0.0%
   <!-- | **Total:** | **3** | **11** | **27.27%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/SQLStatementContextFactory.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2FSQLStatementContextFactory.java#L118) | 1 | 23.53% |
   | [shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/DataNodeRouter.java](https://coveralls.io/builds/32668538/source?filename=shardingsphere-infra%2Fshardingsphere-infra-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Froute%2FDataNodeRouter.java#L62) | 8 | 0% |
   <!-- | **Total:** | **9** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32668538/badge)](https://coveralls.io/builds/32668538) |
   | :-- | --: |
   | Change from base [Build 13651](https://coveralls.io/builds/32650638): |  0.3% |
   | Covered Lines: | 12849 |
   | Relevant Lines: | 22537 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org