jingshanglu commented on a change in pull request #10383:
URL: https://github.com/apache/shardingsphere/pull/10383#discussion_r635868297



##########
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:
       @Icesource Maybe we can refactor it,`fileTableClause` rule has `as`, you 
can give proposal and discuss together .

##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -124,15 +136,16 @@ onString
     ;
 
 memoryTablePrimaryKeyConstraintOption
-    : CLUSTERED withBucket?
+    : NONCLUSTERED

Review comment:
       @Icesource CUSTERED is needed.
   offical doc 
   ```
   <column_constraint> ::=
   [ CONSTRAINT constraint_name ]
   {     { PRIMARY KEY | UNIQUE }
           [ CLUSTERED | NONCLUSTERED ]
           [
               WITH FILLFACTOR = fillfactor
             | WITH ( < index_option > [ , ...n ] )
           ]
           [ ON { partition_scheme_name ( partition_column_name )
               | filegroup | "default" } ]
     
     | [ FOREIGN KEY ]
           REFERENCES [ schema_name . ] referenced_table_name [ ( ref_column ) ]
           [ ON DELETE { NO ACTION | CASCADE | SET NULL | SET DEFAULT } ]
           [ ON UPDATE { NO ACTION | CASCADE | SET NULL | SET DEFAULT } ]
           [ NOT FOR REPLICATION ]
     
     | CHECK [ NOT FOR REPLICATION ] ( logical_expression )
   }
   ```




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


Reply via email to