strongduanmu commented on code in PR #30394:
URL: https://github.com/apache/shardingsphere/pull/30394#discussion_r1513647561


##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4:
##########
@@ -341,9 +341,76 @@ miscellaneousSystemPrivilege
     ;
 
 createUser
-    : CREATE USER
+    : CREATE USER username createUserIdentifiedClause createUserOption*
     ;
 
+createUserIdentifiedClause
+    : IDENTIFIED createUseridentifiedSegment
+    | noAuthOption
+    ;
+
+createUseridentifiedSegment
+    : BY password HTTP? DIGEST? (ENABLE | DISABLE)?
+    | identifiedExternallyOption
+    | identifiedGloballyOption
+    ;
+
+identifiedExternallyOption
+    : EXTERNALLY (AS SQ_ name SQ_)?
+    ;
+
+identifiedGloballyOption
+    : GLOBALLY (AS SQ_ (name | (AZURE_ROLE | AZURE_USER | IAM_GROUP_NAME | 
IAM_PRINCIPAL_NAME) EQ_ name) SQ_)
+    ;
+
+noAuthOption
+    : NO AUTHENTICATION
+    ;
+
+createUserOption
+    : collationOption
+    | tablespaceOption
+    | temporaryOption
+    | quotaOption
+    | profileOption
+    | passwordOption
+    | accountOption
+    | ENABLE EDITIONS
+    | containerOption
+    ;
+

Review Comment:
   Please remove this useless blank line.



##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DCLStatement.g4:
##########
@@ -341,9 +341,76 @@ miscellaneousSystemPrivilege
     ;
 
 createUser
-    : CREATE USER
+    : CREATE USER username createUserIdentifiedClause createUserOption*
     ;
 
+createUserIdentifiedClause
+    : IDENTIFIED createUseridentifiedSegment
+    | noAuthOption
+    ;
+
+createUseridentifiedSegment
+    : BY password HTTP? DIGEST? (ENABLE | DISABLE)?
+    | identifiedExternallyOption
+    | identifiedGloballyOption
+    ;
+
+identifiedExternallyOption
+    : EXTERNALLY (AS SQ_ name SQ_)?
+    ;
+
+identifiedGloballyOption
+    : GLOBALLY (AS SQ_ (name | (AZURE_ROLE | AZURE_USER | IAM_GROUP_NAME | 
IAM_PRINCIPAL_NAME) EQ_ name) SQ_)
+    ;
+
+noAuthOption
+    : NO AUTHENTICATION
+    ;
+
+createUserOption
+    : collationOption
+    | tablespaceOption
+    | temporaryOption
+    | quotaOption
+    | profileOption
+    | passwordOption
+    | accountOption
+    | ENABLE EDITIONS
+    | containerOption
+    ;
+
+
+collationOption
+    : DEFAULT COLLATION collationName
+    ;
+
+tablespaceOption
+    : DEFAULT TABLESPACE tablespaceName
+    ;
+
+temporaryOption
+    : LOCAL? TEMPORARY TABLESPACE tablespaceName tablespaceGroupName
+    ;
+
+quotaOption
+    : QUOTA (sizeClause | UNLIMITED) ON tablespaceName
+    ;
+
+profileOption
+    : PROFILE profileName
+    ;
+
+passwordOption
+    : PASSWORD EXPIRE
+    ;
+
+accountOption
+    : ACCOUNT (LOCK | UNLOCK)
+    ;
+
+containerOption
+    : CONTAINER EQ_ (CURRENT | ALL)
+    ;

Review Comment:
   Please add new line after this sytax.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to