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


##########
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:
   Thank you very much for your review. I have adjusted the problem.



##########
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:
   Thank you very much for your review. I have adjusted the problem.



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