You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/04/28 14:46:26 UTC

[GitHub] [shardingsphere] zhujunxxxxx opened a new pull request #10214: [feat] support alter database grammar

zhujunxxxxx opened a new pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214


   relate issues #10136.
   
   Changes proposed in this pull request:
   - support oracle alter database grammar
   - add test case
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623141890



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)

Review comment:
       Okay, I didn't looked at the illustration. It seems that the document is not consistent at some points πŸ˜•
    
   ![image](https://user-images.githubusercontent.com/66914151/116573061-c84b1e80-a90c-11eb-8b23-600f4fb500ce.png)
   




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-831661678


   Hi @Liangda-w Please give this one a double-checking.


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-828934469


   @tristaZero please review this PR.


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623144103



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY

Review comment:
       oh,  you are so careful.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623095673



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?

Review comment:
       in #10136, 
   >  tristaZero said
   Oracle Ref -> https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlqr/SQL-Statements.html
   
   
   we just support oracle version 19.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623066097



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -526,3 +526,51 @@ hashSubpartitionQuantity
 odciParameters
     : identifier
     ;
+
+databaseName
+    : identifier
+    ;
+
+locationName
+    : STRING_
+    ;
+
+fileName
+    : STRING_
+    ;
+
+asmFileName
+    : identifier
+    ;

Review comment:
       I think `asmFileName` is not the same as `identifier`, please see [doc](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/file_specification.html#GUID-580FA726-F712-4410-90CF-783A2DA89688)

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)

Review comment:
       here `SQ_` not needed?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;

Review comment:
       `RENAME GLOBAL_NAME TO database....` and `set_time_zone_clause` is missing

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;

Review comment:
       Maybe it's better to put `dateValue` in `BaseRule.g4`?
   
   Beside this, the definition is not precise as per [definition](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-DATABASE.html#GUID-8069872F-E680-4511-ADD8-A4E30AF67986):
   
   > date must be a character literal in the format 'YYYY-MM-DD:HH24:MI:SS'. It must represent a time that is immediately after the snapshot was completed. If you specify the UNTIL TIME clause, then SNAPSHOT TIME date must be earlier than UNTIL TIME date.

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterDatabaseStatement.java
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl;
+
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter database statement.
+ */
+@ToString
+public class OracleAlterDatabaseStatement extends AbstractSQLStatement implements DDLStatement, OracleStatement {

Review comment:
       Since alter database is a common sql, also exists in MySQL, PostgreSQL... would it be better to create an abstract `AlterDatabaseStatement` class in `org/apache/shardingsphere/sql/parser/sql/common/statement/ddl`?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;
+
+flashbackModeClause
+    : FLASHBACK (ON | OFF)
+    ;
+
+undoModeClause
+    : LOCAL UNDO (ON | OFF)
+    ;
+
+moveDatafileClause
+    : MOVE DATAFILE LP_ (fileName | asmFileName | fileNumber) RP_
+    (TO LP_ (fileName | asmFileName) RP_ )? REUSE? KEEP?
+    ;

Review comment:
       why `LP_` and `RP_`? Should be `SQ_`?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*

Review comment:
       `TEMPFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*`

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY

Review comment:
       why `LP_` and `RP_`?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;

Review comment:
       I think the brackets should be like the following, as `parallel_clause` is optional for all the clauses before
   
   ```
   standbyDatabaseClauses
       : ((activateStandbyDbClause
       | maximizeStandbyDbClause
       | registerLogfileClause
       | commitSwitchoverClause
       | startStandbyClause
       | stopStandbyClause
       | convertDatabaseClause) parallelClause?)
       | (switchoverClause | failoverClause)
       ;
   ```

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;

Review comment:
       `INITIAL scn_value` is missing

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;

Review comment:
       `RENAME GLOBAL_NAME TO database....` and `set_time_zone_clause` is missing

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;
+
+flashbackModeClause
+    : FLASHBACK (ON | OFF)
+    ;
+
+undoModeClause
+    : LOCAL UNDO (ON | OFF)
+    ;
+
+moveDatafileClause
+    : MOVE DATAFILE LP_ (fileName | asmFileName | fileNumber) RP_
+    (TO LP_ (fileName | asmFileName) RP_ )? REUSE? KEEP?
+    ;
+
+instanceClauses
+    : (ENABLE | DISABLE) INSTANCE instanceName
+    ;
+
+securityClause
+    : GUARD (ALL | STANDBY | NONE)
+    ;
+
+prepareClause
+    : PREPARE MIRROR COPY copyName WITH (UNPROTECTED | MIRROR | HIGH) REDUNDANCY
+    ;

Review comment:
       `PREPARE MIRROR COPY copyName (WITH (UNPROTECTED | MIRROR | HIGH) REDUNDANCY)?`




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-828546318


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10214](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4d8ddf5) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c5f300a8e94e6253c51c2e17b49bbcd4ec70b426?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5f300a) will **decrease** coverage by `0.12%`.
   > The diff coverage is `33.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10214/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #10214      +/-   ##
   ============================================
   - Coverage     68.08%   67.95%   -0.13%     
   - Complexity      680      683       +3     
   ============================================
     Files          1696     1705       +9     
     Lines         29108    29204      +96     
     Branches       5216     5250      +34     
   ============================================
   + Hits          19817    19846      +29     
   - Misses         7772     7828      +56     
   - Partials       1519     1530      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | Complexity Ξ” | |
   |---|---|---|---|
   | [...l/common/statement/ddl/AlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3N0YXRlbWVudC9kZGwvQWx0ZXJEYXRhYmFzZVN0YXRlbWVudC5qYXZh) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...ement/oracle/ddl/OracleAlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbHRlckRhdGFiYXNlU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `84.42% <100.00%> (+0.12%)` | `1.00 <0.00> (ΓΈ)` | |
   | [...and/query/binary/bind/PostgreSQLComBindPacket.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9Qb3N0Z3JlU1FMQ29tQmluZFBhY2tldC5qYXZh) | `49.09% <0.00%> (-36.63%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...e/registry/listener/metadata/MetaDataListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9saXN0ZW5lci9tZXRhZGF0YS9NZXRhRGF0YUxpc3RlbmVyLmphdmE=) | `40.00% <0.00%> (-25.00%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...or/statement/impl/SQL92DDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWw5Mi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWw5Mi92aXNpdG9yL3N0YXRlbWVudC9pbXBsL1NRTDkyRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `65.00% <0.00%> (-12.50%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...gresql/command/PostgreSQLCommandExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvZnJvbnRlbmQvcG9zdGdyZXNxbC9jb21tYW5kL1Bvc3RncmVTUUxDb21tYW5kRXhlY3V0ZUVuZ2luZS5qYXZh) | `7.69% <0.00%> (-5.65%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...protocol/PostgreSQLNumericBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMTnVtZXJpY0JpbmFyeVByb3RvY29sVmFsdWUuamF2YQ==) | `77.77% <0.00%> (-2.23%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...otocol/PostgreSQLBoolArrayBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMQm9vbEFycmF5QmluYXJ5UHJvdG9jb2xWYWx1ZS5qYXZh) | `85.71% <0.00%> (-1.79%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...otocol/PostgreSQLInt2ArrayBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMSW50MkFycmF5QmluYXJ5UHJvdG9jb2xWYWx1ZS5qYXZh) | `85.71% <0.00%> (-1.79%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | ... and [128 more](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c5f300a...4d8ddf5](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623127443



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;
+
+flashbackModeClause
+    : FLASHBACK (ON | OFF)
+    ;
+
+undoModeClause
+    : LOCAL UNDO (ON | OFF)
+    ;
+
+moveDatafileClause
+    : MOVE DATAFILE LP_ (fileName | asmFileName | fileNumber) RP_
+    (TO LP_ (fileName | asmFileName) RP_ )? REUSE? KEEP?
+    ;

Review comment:
       `fileName` define in baseRule used `STRING_`, so did't add `SQ_`.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623097606



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?

Review comment:
       @Liangda-w can you give me ref url.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-831856366


   > Hi @Liangda-w Please give this one a double-checking.
   
   Looks goodπŸ‘ it's time to merge


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623102641



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;

Review comment:
       Maybe it's better to put `dateValue` in `BaseRule.g4`?
   
   Beside this, the definition is not precise, per [definition](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-DATABASE.html#GUID-8069872F-E680-4511-ADD8-A4E30AF67986):
   
   > date must be a character literal in the format 'YYYY-MM-DD:HH24:MI:SS'. It must represent a time that is immediately after the snapshot was completed. If you specify the UNTIL TIME clause, then SNAPSHOT TIME date must be earlier than UNTIL TIME date.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623141775



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;

Review comment:
       you are right.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-828546318


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10214](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (59ffd59) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c5f300a8e94e6253c51c2e17b49bbcd4ec70b426?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5f300a) will **decrease** coverage by `0.12%`.
   > The diff coverage is `33.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10214/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #10214      +/-   ##
   ============================================
   - Coverage     68.08%   67.95%   -0.13%     
   - Complexity      680      683       +3     
   ============================================
     Files          1696     1705       +9     
     Lines         29108    29204      +96     
     Branches       5216     5250      +34     
   ============================================
   + Hits          19817    19846      +29     
   - Misses         7772     7828      +56     
   - Partials       1519     1530      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | Complexity Ξ” | |
   |---|---|---|---|
   | [...l/common/statement/ddl/AlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3N0YXRlbWVudC9kZGwvQWx0ZXJEYXRhYmFzZVN0YXRlbWVudC5qYXZh) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...ement/oracle/ddl/OracleAlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbHRlckRhdGFiYXNlU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `84.42% <100.00%> (+0.12%)` | `1.00 <0.00> (ΓΈ)` | |
   | [...and/query/binary/bind/PostgreSQLComBindPacket.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9Qb3N0Z3JlU1FMQ29tQmluZFBhY2tldC5qYXZh) | `49.09% <0.00%> (-36.63%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...e/registry/listener/metadata/MetaDataListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9saXN0ZW5lci9tZXRhZGF0YS9NZXRhRGF0YUxpc3RlbmVyLmphdmE=) | `40.00% <0.00%> (-25.00%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...or/statement/impl/SQL92DDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWw5Mi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWw5Mi92aXNpdG9yL3N0YXRlbWVudC9pbXBsL1NRTDkyRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `65.00% <0.00%> (-12.50%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...gresql/command/PostgreSQLCommandExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvZnJvbnRlbmQvcG9zdGdyZXNxbC9jb21tYW5kL1Bvc3RncmVTUUxDb21tYW5kRXhlY3V0ZUVuZ2luZS5qYXZh) | `7.69% <0.00%> (-5.65%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...protocol/PostgreSQLNumericBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMTnVtZXJpY0JpbmFyeVByb3RvY29sVmFsdWUuamF2YQ==) | `77.77% <0.00%> (-2.23%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...otocol/PostgreSQLBoolArrayBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMQm9vbEFycmF5QmluYXJ5UHJvdG9jb2xWYWx1ZS5qYXZh) | `85.71% <0.00%> (-1.79%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...otocol/PostgreSQLInt2ArrayBinaryProtocolValue.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvY29tbWFuZC9xdWVyeS9iaW5hcnkvYmluZC9wcm90b2NvbC9Qb3N0Z3JlU1FMSW50MkFycmF5QmluYXJ5UHJvdG9jb2xWYWx1ZS5qYXZh) | `85.71% <0.00%> (-1.79%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | ... and [128 more](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c5f300a...59ffd59](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-828546318


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10214](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (242cc8e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c5f300a8e94e6253c51c2e17b49bbcd4ec70b426?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5f300a) will **increase** coverage by `0.00%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10214/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master   #10214   +/-   ##
   =========================================
     Coverage     68.08%   68.08%           
     Complexity      680      680           
   =========================================
     Files          1696     1697    +1     
     Lines         29108    29113    +5     
     Branches       5216     5214    -2     
   =========================================
   + Hits          19817    19821    +4     
     Misses         7772     7772           
   - Partials       1519     1520    +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | Complexity Ξ” | |
   |---|---|---|---|
   | [...ement/oracle/ddl/OracleAlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbHRlckRhdGFiYXNlU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `84.42% <100.00%> (+0.12%)` | `1.00 <0.00> (ΓΈ)` | |
   | [...ine/type/unicast/ShardingUnicastRoutingEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctcm91dGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3JvdXRlL2VuZ2luZS90eXBlL3VuaWNhc3QvU2hhcmRpbmdVbmljYXN0Um91dGluZ0VuZ2luZS5qYXZh) | `94.73% <0.00%> (-0.39%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...e/context/metadata/GovernanceMetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9tZXRhZGF0YS9Hb3Zlcm5hbmNlTWV0YURhdGFDb250ZXh0cy5qYXZh) | `85.06% <0.00%> (-0.37%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...ra/config/properties/ConfigurationPropertyKey.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvcHJvcGVydGllcy9Db25maWd1cmF0aW9uUHJvcGVydHlLZXkuamF2YQ==) | `100.00% <0.00%> (ΓΈ)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...phere/governance/core/registry/RegistryCenter.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9SZWdpc3RyeUNlbnRlci5qYXZh) | `57.89% <0.00%> (+0.44%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...et/handshake/PostgreSQLAuthenticationOKPacket.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wvc2hhcmRpbmdzcGhlcmUtZGItcHJvdG9jb2wtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGIvcHJvdG9jb2wvcG9zdGdyZXNxbC9wYWNrZXQvaGFuZHNoYWtlL1Bvc3RncmVTUUxBdXRoZW50aWNhdGlvbk9LUGFja2V0LmphdmE=) | `100.00% <0.00%> (+25.00%)` | `0.00% <0.00%> (ΓΈ%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c5f300a...242cc8e](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r622987466



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterDatabaseStatement.java
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl;
+
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter database statement.
+ */
+@ToString
+public class OracleAlterDatabaseStatement extends AbstractSQLStatement implements DDLStatement, OracleStatement {

Review comment:
       Hi, this PR generally great, but i guess we still need to fill this class with some fields, i.e., database name etc.
   Therefore it is expected to visit the corresponding content by antlr visitor.
   You can choose to add that part in this PR or implement it in the next PR. How do you think?




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214


   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623101338



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?

Review comment:
       @Liangda-w OK, I have found my problem, thanks.^_^




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r622999695



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -183,6 +183,10 @@ accessDriverType
     : identifier
     ;
 
+partition
+    : identifier
+    ;
+

Review comment:
       please use `partitionName` instead of `partition`




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623052151



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?

Review comment:
       `database_clause` is not complete 
   
   ![image](https://user-images.githubusercontent.com/66914151/116558217-7ea80700-a8ff-11eb-9adf-3da4733a4265.png)
   




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-832526653


   Hi Great, guys.


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623902507



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -526,3 +526,51 @@ hashSubpartitionQuantity
 odciParameters
     : identifier
     ;
+
+databaseName
+    : identifier
+    ;
+
+locationName
+    : STRING_
+    ;
+
+fileName
+    : STRING_
+    ;
+
+asmFileName
+    : identifier
+    ;

Review comment:
       @Liangda-w `asmFileName` can you help me? because I don't know how to define it.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r624573866



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -526,3 +526,51 @@ hashSubpartitionQuantity
 odciParameters
     : identifier
     ;
+
+databaseName
+    : identifier
+    ;
+
+locationName
+    : STRING_
+    ;
+
+fileName
+    : STRING_
+    ;
+
+asmFileName
+    : identifier
+    ;

Review comment:
       Hi @zhujunxxxxx maybe is STRING_ better?




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r622999140



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterDatabaseStatement.java
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl;
+
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter database statement.
+ */
+@ToString
+public class OracleAlterDatabaseStatement extends AbstractSQLStatement implements DDLStatement, OracleStatement {

Review comment:
       ok,next PR fix it.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623093762



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?

Review comment:
       https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/img_text/alter_database.html 




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r624684883



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -526,3 +526,51 @@ hashSubpartitionQuantity
 odciParameters
     : identifier
     ;
+
+databaseName
+    : identifier
+    ;
+
+locationName
+    : STRING_
+    ;
+
+fileName
+    : STRING_
+    ;
+
+asmFileName
+    : identifier
+    ;

Review comment:
       I think so.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623131545



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)

Review comment:
       <img width="888" alt="ζˆͺ屏2021-04-29 δΈ‹εˆ10 51 14" src="https://user-images.githubusercontent.com/7948408/116571609-d2394580-a93d-11eb-9e19-245ac3a180b9.png">
   
   yes, `SQ_` is need.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
zhujunxxxxx commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623036655



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
##########
@@ -183,6 +183,10 @@ accessDriverType
     : identifier
     ;
 
+partition
+    : identifier
+    ;
+

Review comment:
       ok, this `partition` is not use, i will remove it.




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on a change in pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on a change in pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#discussion_r623137079



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -1132,3 +1132,278 @@ rowArchivalVisibilityClause
 defaultCollationClause
     : DEFAULT_COLLATION EQ_ (collationName | NONE)
     ;
+
+alterDatabase
+    : ALTER DATABASE databaseName?
+    ( startupClauses
+    | recoveryClauses
+    | databaseFileClauses
+    | logfileClauses
+    | controlfileClauses
+    | standbyDatabaseClauses
+    | defaultSettingsClauses
+    | instanceClauses
+    | securityClause
+    | prepareClause
+    | dropMirrorCopy
+    | lostWriteProtection
+    | cdbFleetClauses
+    | propertyClause )
+    ;
+
+startupClauses
+    : MOUNT ((STANDBY | CLONE) DATABASE)?
+    | OPEN ((READ WRITE)? (RESETLOGS | NORESETLOGS)? (UPGRADE | DOWNGRADE)? | READ ONLY)
+    ;
+
+recoveryClauses
+    : generalRecovery | managedStandbyRecovery | BEGIN BACKUP | END BACKUP
+    ;
+
+generalRecovery
+    : RECOVER (AUTOMATIC)? (FROM locationName)? (
+      (fullDatabaseRecovery | partialDatabaseRecovery | LOGFILE fileName)
+      ((TEST | ALLOW NUMBER_ CORRUPTION | parallelClause)+)?
+    | CONTINUE DEFAULT?
+    | CANCEL
+    )
+    ;
+
+fullDatabaseRecovery
+    : STANDBY? DATABASE
+    ((UNTIL (CANCEL | TIME dateValue | CHANGE NUMBER_ | CONSISTENT)
+    | USING BACKUP CONTROLFILE
+    | SNAPSHOT TIME dateValue
+    )+)?
+    ;
+
+dateValue
+    : dateTimeLiterals | stringLiterals | numberLiterals | expr
+    ;
+
+partialDatabaseRecovery
+    : TABLESPACE tablespaceName (COMMA_ tablespaceName)*
+    | DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ;
+
+managedStandbyRecovery
+    : RECOVER (MANAGED STANDBY DATABASE
+    ((USING ARCHIVED LOGFILE | DISCONNECT (FROM SESSION)?
+    | NODELAY
+    | UNTIL CHANGE NUMBER_
+    | UNTIL CONSISTENT | USING INSTANCES (ALL | NUMBER_) | parallelClause)+
+    | FINISH | CANCEL)?
+    | TO LOGICAL STANDBY (databaseName | KEEP IDENTITY))
+    ;
+
+databaseFileClauses
+    : RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | createDatafileClause
+    | alterDatafileClause
+    | alterTempfileClause
+    | moveDatafileClause
+    ;
+
+createDatafileClause
+    : CREATE DATAFILE (fileName | fileNumber) (COMMA_ (fileName | fileNumber))*
+    ( AS (fileSpecification (COMMA_ fileSpecification)* | NEW))?
+    ;
+
+fileSpecification
+    : datafileTempfileSpec | redoLogFileSpec
+    ;
+
+datafileTempfileSpec
+    : (fileName | asmFileName )? (SIZE sizeClause)? REUSE? autoextendClause?
+    ;
+
+autoextendClause
+    : AUTOEXTEND (OFF | ON (NEXT sizeClause)? maxsizeClause?)
+    ;
+
+redoLogFileSpec
+    : ((fileName | asmFileName)
+    | LP_ (fileName | asmFileName) (COMMA_ (fileName | asmFileName))* RP_)?
+    (SIZE sizeClause)? (BLOCKSIZE sizeClause)? REUSE?
+    ;
+
+alterDatafileClause
+    : DATAFILE (fileName | NUMBER_) (COMMA_ (fileName | NUMBER_))*
+    (ONLINE | OFFLINE (FOR DROP)? | RESIZE sizeClause | autoextendClause | END BACKUP | ENCRYPT | DECRYPT)
+    ;
+
+alterTempfileClause
+    : TEMPFILE fileName (COMMA_ fileName )*
+    (RESIZE sizeClause | autoextendClause | DROP (INCLUDING DATAFILES)? | ONLINE | OFFLINE)
+    ;
+
+logfileClauses
+    : ((ARCHIVELOG MANUAL? | NOARCHIVELOG )
+    | NO? FORCE LOGGING
+    | SET STANDBY NOLOGGING FOR (DATA AVAILABILITY | LOAD PERFORMANCE)
+    | RENAME FILE fileName (COMMA_ fileName)* TO fileName
+    | CLEAR UNARCHIVED? LOGFILE logfileDescriptor (COMMA_ logfileDescriptor)* (UNRECOVERABLE DATAFILE)?
+    | addLogfileClauses
+    | dropLogfileClauses
+    | switchLogfileClause
+    | supplementalDbLogging)
+    ;
+
+logfileDescriptor
+    : GROUP NUMBER_ | LP_ fileName (COMMA_ fileName)* RP_ | fileName
+    ;
+
+addLogfileClauses
+    : ADD STANDBY? LOGFILE
+    (((INSTANCE instanceName)? | (THREAD SQ_ NUMBER_ SQ_)?)
+    (GROUP NUMBER_)? redoLogFileSpec (COMMA_ (GROUP NUMBER_)? redoLogFileSpec)*
+    | MEMBER fileName REUSE? (COMMA_ fileName REUSE?)* TO logfileDescriptor (COMMA_ logfileDescriptor)*)
+    ;
+
+controlfileClauses
+    : CREATE ((LOGICAL | PHYSICAL)? STANDBY | FAR SYNC INSTANCE) CONTROLFILE AS fileName REUSE?
+    | BACKUP CONTROLFILE TO (fileName REUSE? | traceFileClause)
+    ;
+
+traceFileClause
+    : TRACE (AS fileName REUSE?)? (RESETLOGS | NORESETLOGS)?
+    ;
+
+dropLogfileClauses
+    : DROP STANDBY? LOGFILE
+    (logfileDescriptor (COMMA_ logfileDescriptor)*
+    | MEMBER fileName (COMMA_ fileName)*)
+    ;
+
+switchLogfileClause
+    : SWITCH ALL LOGFILES TO BLOCKSIZE NUMBER_
+    ;
+
+supplementalDbLogging
+    : (ADD | DROP) SUPPLEMENTAL LOG
+    ( DATA
+    | supplementalIdKeyClause
+    | supplementalPlsqlClause
+    | supplementalSubsetReplicationClause)
+    ;
+
+supplementalPlsqlClause
+    : DATA FOR PROCEDURAL REPLICATION
+    ;
+
+supplementalSubsetReplicationClause
+    : DATA SUBSET DATABASE REPLICATION
+    ;
+
+standbyDatabaseClauses
+    : ((activateStandbyDbClause
+    | maximizeStandbyDbClause
+    | registerLogfileClause
+    | commitSwitchoverClause
+    | startStandbyClause
+    | stopStandbyClause
+    | convertDatabaseClause parallelClause?)
+    | (switchoverClause | failoverClause))
+    ;
+
+activateStandbyDbClause
+    : ACTIVATE (PHYSICAL | LOGICAL)? STANDBY DATABASE (FINISH APPLY)?
+    ;
+
+maximizeStandbyDbClause
+    : SET STANDBY DATABASE TO MAXIMIZE (PROTECTION | AVAILABILITY | PERFORMANCE)
+    ;
+
+registerLogfileClause
+    : REGISTER (OR REPLACE)? (PHYSICAL | LOGICAL)? LOGFILE fileSpecification (COMMA_ fileSpecification)* (FOR logminerSessionName)?
+    ;
+
+commitSwitchoverClause
+    : (PREPARE | COMMIT) TO SWITCHOVER
+    ( TO (((PHYSICAL | LOGICAL)? PRIMARY | PHYSICAL? STANDBY) ((WITH | WITHOUT) SESSION SHUTDOWN (WAIT | NOWAIT))?
+    | LOGICAL STANDBY)
+    | CANCEL
+    )?
+    ;
+
+startStandbyClause
+    : START LOGICAL STANDBY APPLY IMMEDIATE? NODELAY? (NEW PRIMARY dbLink | (SKIP_SYMBOL FAILED TRANSACTION | FINISH))?
+    ;
+
+stopStandbyClause
+    : (STOP | ABORT) LOGICAL STANDBY APPLY
+    ;
+
+switchoverClause
+    : SWITCHOVER TO databaseName (VERIFY | FORCE)?
+    ;
+
+convertDatabaseClause
+    : CONVERT TO LP_ (PHYSICAL | SNAPSHOT) RP_ STANDBY
+    ;
+
+failoverClause
+    : FAILOVER TO databaseName FORCE?
+    ;
+
+defaultSettingsClauses
+    : DEFAULT EDITION EQ_ editionName
+    | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE
+    | DEFAULT TABLESPACE tablespaceName
+    | DEFAULT LOCAL? TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName)
+    | ENABLE BLOCK CHANGE TRACKING (USING FILE fileName REUSE?)?
+    | DISABLE BLOCK CHANGE TRACKING
+    | NO? FORCE FULL DATABASE CACHING
+    | CONTAINERS DEFAULT TARGET EQ_ (LP_ containerName RP_ | NONE)
+    | flashbackModeClause
+    | undoModeClause
+    ;
+
+flashbackModeClause
+    : FLASHBACK (ON | OFF)
+    ;
+
+undoModeClause
+    : LOCAL UNDO (ON | OFF)
+    ;
+
+moveDatafileClause
+    : MOVE DATAFILE LP_ (fileName | asmFileName | fileNumber) RP_
+    (TO LP_ (fileName | asmFileName) RP_ )? REUSE? KEEP?
+    ;

Review comment:
       oh yes, that's right! Then LP_ and RP_ should be deleted. 
   And don't forget to add `SQ_` in `asmFileName` as well:)




-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-829924584


   Hey, @Liangda-w , Nice job. :)
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10214: Support alter database grammar

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10214:
URL: https://github.com/apache/shardingsphere/pull/10214#issuecomment-828546318


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10214](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d582fc) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c5f300a8e94e6253c51c2e17b49bbcd4ec70b426?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c5f300a) will **decrease** coverage by `0.05%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10214/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #10214      +/-   ##
   ============================================
   - Coverage     68.08%   68.02%   -0.06%     
     Complexity      680      680              
   ============================================
     Files          1696     1697       +1     
     Lines         29108    29131      +23     
     Branches       5216     5222       +6     
   ============================================
     Hits          19817    19817              
   - Misses         7772     7790      +18     
   - Partials       1519     1524       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | Complexity Ξ” | |
   |---|---|---|---|
   | [...ement/oracle/ddl/OracleAlterDatabaseStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbHRlckRhdGFiYXNlU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ΓΈ)` | `0.00 <0.00> (?)` | |
   | [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1vcmFjbGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvb3JhY2xlL3Zpc2l0b3Ivc3RhdGVtZW50L2ltcGwvT3JhY2xlRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `84.42% <100.00%> (+0.12%)` | `1.00 <0.00> (ΓΈ)` | |
   | [...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=) | `22.22% <0.00%> (-29.63%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...or/statement/impl/SQL92DDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1zcWw5Mi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWw5Mi92aXNpdG9yL3N0YXRlbWVudC9pbXBsL1NRTDkyRERMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `65.00% <0.00%> (-12.50%)` | `1.00% <0.00%> (ΓΈ%)` | |
   | [...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh) | `88.88% <0.00%> (-11.12%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh) | `68.88% <0.00%> (-6.67%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==) | `72.91% <0.00%> (-2.09%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...ine/type/unicast/ShardingUnicastRoutingEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctcm91dGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3JvdXRlL2VuZ2luZS90eXBlL3VuaWNhc3QvU2hhcmRpbmdVbmljYXN0Um91dGluZ0VuZ2luZS5qYXZh) | `94.73% <0.00%> (-0.39%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...e/context/metadata/GovernanceMetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9tZXRhZGF0YS9Hb3Zlcm5hbmNlTWV0YURhdGFDb250ZXh0cy5qYXZh) | `85.06% <0.00%> (-0.37%)` | `0.00% <0.00%> (ΓΈ%)` | |
   | [...ra/config/properties/ConfigurationPropertyKey.java](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvcHJvcGVydGllcy9Db25maWd1cmF0aW9uUHJvcGVydHlLZXkuamF2YQ==) | `100.00% <0.00%> (ΓΈ)` | `0.00% <0.00%> (ΓΈ%)` | |
   | ... and [5 more](https://codecov.io/gh/apache/shardingsphere/pull/10214/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c5f300a...7d582fc](https://codecov.io/gh/apache/shardingsphere/pull/10214?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org