Icesource commented on a change in pull request #10383:
URL: https://github.com/apache/shardingsphere/pull/10383#discussion_r637547372
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -91,6 +91,18 @@ columnConstraint
: (CONSTRAINT ignoredIdentifier)? (primaryKeyConstraint |
columnForeignKeyConstraint | checkConstraint)
;
+computedColumnConstraint
+ : (CONSTRAINT ignoredIdentifier)? (primaryKeyConstraint |
computedColumnForeignKeyConstraint | checkConstraint)
+ ;
+
+computedColumnForeignKeyConstraint
+ : (FOREIGN KEY)? tableName (LP_ columnName RP_)?
computedColumnForeignKeyOnAction*
+ ;
+
+computedColumnForeignKeyOnAction
+ : ON DELETE (NO ACTION | CASCADE) | ON UPDATE NO ACTION | NOT FOR
REPLICATION
+ ;
+
Review comment:
@jingshanglu I think this may not be a problem, because the SQL server
official website also rewrites this similar syntax twice. According to the
current writing method, it can maintain higher consistency and readability with
the official website grammar definition. They are not the same and the scope of
action is different.
--
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:
[email protected]