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 2022/05/31 04:53:14 UTC

[GitHub] [shardingsphere] everly-gif opened a new pull request, #18086: Support Parsing `ALTER TYPE` in openGauss

everly-gif opened a new pull request, #18086:
URL: https://github.com/apache/shardingsphere/pull/18086

   Ref #17736 
   
   Changes proposed in this pull request:
   - Proofreads `ALTER TYPE` grammar
   - Supports Parsing `ALTER TYPE` in openGauss
   - Adds tests
   
   ✅ Builds locally
   


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


[GitHub] [shardingsphere] everly-gif commented on a diff in pull request #18086: Support Parsing `ALTER TYPE` in openGauss

Posted by GitBox <gi...@apache.org>.
everly-gif commented on code in PR #18086:
URL: https://github.com/apache/shardingsphere/pull/18086#discussion_r885207685


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/DDLStatement.g4:
##########
@@ -1161,7 +1161,6 @@ alterTypeClauses
     | RENAME TO name
     | RENAME ATTRIBUTE name TO name dropBehavior?
     | SET SCHEMA name
-    | SET LP_ operatorDefList RP_

Review Comment:
   Yes, It isnt mentioned in their syntax for `ALTER TYPE`
   
   You can see it here : https://opengauss.org/en/docs/3.0.0/docs/Developerguide/alter-type.html
   
   



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


[GitHub] [shardingsphere] strongduanmu merged pull request #18086: Support Parsing `ALTER TYPE` in openGauss

Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #18086:
URL: https://github.com/apache/shardingsphere/pull/18086


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


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #18086: Support Parsing `ALTER TYPE` in openGauss

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #18086:
URL: https://github.com/apache/shardingsphere/pull/18086#discussion_r885203402


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/DDLStatement.g4:
##########
@@ -1161,7 +1161,6 @@ alterTypeClauses
     | RENAME TO name
     | RENAME ATTRIBUTE name TO name dropBehavior?
     | SET SCHEMA name
-    | SET LP_ operatorDefList RP_

Review Comment:
   Does openGauss not support this syntax?



##########
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/statement/ddl/AlterTypeStatement.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * 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.common.statement.ddl;
+
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+
+/**
+ * Alter type statement.
+ */
+@ToString
+public abstract class AlterTypeStatement extends AbstractSQLStatement implements DDLStatement {
+    

Review Comment:
   Please remove this useless blank line.



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


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #18086: Support Parsing `ALTER TYPE` in openGauss

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #18086:
URL: https://github.com/apache/shardingsphere/pull/18086#discussion_r885218678


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/antlr4/imports/opengauss/DDLStatement.g4:
##########
@@ -1161,7 +1161,6 @@ alterTypeClauses
     | RENAME TO name
     | RENAME ATTRIBUTE name TO name dropBehavior?
     | SET SCHEMA name
-    | SET LP_ operatorDefList RP_

Review Comment:
   > Yes, It isnt mentioned in their syntax for `ALTER TYPE`
   > 
   > You can see it here : https://opengauss.org/en/docs/3.0.0/docs/Developerguide/alter-type.html
   
   Ok, I got 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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