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



##########
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:
       @jingshanglu 
   In my viewpoint, The syntax “memoryTablePrimaryKeyConstraintOption” is used 
to parse memory optimized create table syntax. CLUSTERED is in syntax 
"diskTablePrimaryKeyConstraintOption".
   memoryTablePrimaryKeyConstraintOption in offical doc
   ```
   <column_constraint> ::=
    [ CONSTRAINT constraint_name ]
   {
     { PRIMARY KEY | UNIQUE }
         {   NONCLUSTERED
           | NONCLUSTERED HASH WITH (BUCKET_COUNT = bucket_count)
         }
     | [ FOREIGN KEY ]
           REFERENCES [ schema_name . ] referenced_table_name [ ( ref_column ) ]
     | CHECK ( logical_expression )
   }
   ```
   
   And CUSTERED is included in "diskTablePrimaryKeyConstraintOption":
   
   ```
   primaryKeyConstraint
       : (primaryKey | UNIQUE) (diskTablePrimaryKeyConstraintOption | 
memoryTablePrimaryKeyConstraintOption)
       ;
   diskTablePrimaryKeyConstraintOption
       : clusterOption? primaryKeyWithClause? primaryKeyOnClause?
       ;
   clusterOption
       : CLUSTERED | NONCLUSTERED
       ;
   ```




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