[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r630288626 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals Review comment: @wgy8283335 please correct me if I'm wrong. 1. `INTEGER_` can only hold whole numbers without decimals. `NUMBER_` can hold whole as well as decimal numbers. `numberLiterals` can have `INTEGER_` and `NUMBER_`. 2. Since we put `INTEGER_` before `NUMBER_`, even if we expect `NUMBER_` the parsing tree matches with `INTEGER_` for whole numbers. But for decimal numbers, it matches `NUMBER_` correctly. 3. As mentioned in the [literals ](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Literals.html#GUID-1824CBAA-6E16-4921-B2A6-112FB02248DA) documentation, we should use `INTEGER_` notation whenever integer appears and should use `NUMBER_` notation whenever number or n appears. 4. But as previously mentioned in the 2nd point, if we expect `NUMBER_` and specify the whole number in SQL, the parsing tree will match `INTEGER_`. In this case, ANTLR will give us an error. 5. In some cases, there won't be parameters appear with integer, number and n. At those places, if we're sure about whether it'll contain whole or decimal, we can explicitly specify `INTEGER_` or `NUMBER_`. Otherwise, we can simply put `numberLiterals` as it'll match both of them in any cases. 6. I think, to resolve the issue mentioned in point 4: I. If we're sure if that number can have both whole and decimal numbers, we can put it as `numberLiterals`. In this way, if it's a whole number, the parsing tree will match `INTEGER_` and if it's a decimal number, it'll match `NUMBER_`. II. If we're sure if that number will only contain whole number only then we can specify it as `INTEGER`. I'm sorry if it's a silly thing. Please tell me what do you think to resolve this issue. I pushed my code. Please check 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r629841182 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals Review comment: I added `INTEGER_` before `NUMBER_` @wgy8283335 though the error comes like before: ![BuildFails](https://user-images.githubusercontent.com/48581379/117759246-14695d80-b241-11eb-8a66-70e3921f63e5.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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r628421537 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals Review comment: I added the `INTEGER_` rule but the parse tree matches with `NUMBER_` ![changeClause](https://user-images.githubusercontent.com/48581379/117492679-929ed900-af8f-11eb-9b5a-b655ca1645d3.png) Build fails as well ![BuildFails](https://user-images.githubusercontent.com/48581379/117489741-9c264200-af8b-11eb-8046-a956c411f304.png) Then I tried to change rules for `NUMBER_`, it doesn't work too. ![changeIntegerAndNumberRules](https://user-images.githubusercontent.com/48581379/117491974-99791c00-af8e-11eb-88cc-dc0a4c14926e.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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627979217 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| alterSystemSwitchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses Review comment: Hi @Liangda-w, I'll fix that. -- 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627141925 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? +; + +nextClause +: NEXT +; + +allClause +: ALL +; + +toLocationClause +: TO logFileGroupsArchivedLocationName +; + +flushClauseOption +: sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause +; + +disconnectSessionClause +: DISCONNECT SESSION SQ_ numberLiterals COMMA_ numberLiterals SQ_ POST_TRANSACTION? +; + +killSessionClause +: KILL SESSION SQ_ numberLiterals COMMA_ numberLiterals (COMMA_ AT_ numberLiterals)? SQ_ +; + +startRollingMigrationClause +: START ROLLING MIGRATION TO asmVersion +; + +stopRollingMigrationClause +: STOP ROLLING MIGRATION +; + +startRollingPatchClause +: START ROLLING PATCH +; + +stopRollingPatchClause +: STOP ROLLING PATCH +; + +restrictedSessionClause +: (ENABLE | DISABLE) RESTRICTED SESSION +; + +setEncryptionWalletOpenClause +: SET ENCRYPTION WALLET OPEN IDENTIFIED BY (walletPassword | hsmAuthString) Review comment: ![walletOpenClause](https://user-images.githubusercontent.com/48581379/117255886-d1397400-ae67-11eb-9ef0-698899457128.png) Since I specified `walletPassword` and `hsmAuthString` as `identifier`, I thought when we type either one of these would still be wrapped by double quotes. So I didn't double quotes. -- 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627144455 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? +; + +nextClause +: NEXT +; + +allClause +: ALL +; + +toLocationClause +: TO logFileGroupsArchivedLocationName +; + +flushClauseOption +: sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause +; + +disconnectSessionClause +: DISCONNECT SESSION SQ_ numberLiterals COMMA_ numberLiterals SQ_ POST_TRANSACTION? +; + +killSessionClause +: KILL SESSION SQ_ numberLiterals COMMA_ numberLiterals (COMMA_ AT_ numberLiterals)? SQ_ +; + +startRollingMigrationClause +: START ROLLING MIGRATION TO asmVersion +; + +stopRollingMigrationClause +: STOP ROLLING MIGRATION +; + +startRollingPatchClause +: START ROLLING PATCH +; + +stopRollingPatchClause +: STOP ROLLING PATCH +; + +restrictedSessionClause +: (ENABLE | DISABLE) RESTRICTED SESSION +; + +setEncryptionWalletOpenClause +: SET ENCRYPTION WALLET OPEN IDENTIFIED BY (walletPassword | hsmAuthString) +; + +setEncryptionWalletCloseClause +: SET ENCRYPTION WALLET CLOSE (IDENTIFIED BY (walletPassword | hsmAuthString))? +; + +setEncryptionKeyClause +: SET ENCRYPTION KEY (identifiedByWalletPassword | identifiedByHsmAuthString) +; + +enableAffinityClause +: ENABLE AFFINITY tableName (SERVICE serviceName)? +; + +disableAffinityClause +: DISABLE AFFINITY tableName +; + +alterSystemSetClause +: setParameterClause | useStoredOutlinesClause | globalTopicEnabledClause +; + +alterSystemResetClause +: parameterName scopeClause* +; + +sharedPoolClause +: SHARED_POOL +; + +globalContextClause +: GLOBAL CONTEXT +; + +bufferCacheClause +: BUFFER_CACHE +; + +flashCacheClause +: FLASH_CACHE +; + +redoToClause +: REDO TO targetDbName (NO? CONFIRM APPLY)? +; + +identifiedByWalletPassword +: certificateId? IDENTIFIED BY walletPassword Review comment: ![identifiedByWalletPasswordClause](http
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627227764 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ Review comment: I specified `instanceId` as `AT_ numberLiterals` in BaseRule.g4. I'll change `cancelSqlClause` as: ``` cancelSqlClause : CANCEL SQL SQ_ sessionId serialNumber (AT_ instanceId)? sqlId? SQ_ ; ``` I guess `instanceId` should be changed to `NUMBER_` as it can't contain negative values? -- 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627222548 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals Review comment: In [ALTER SYSTEM](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SYSTEM.html#GUID-2C638517-D73A-41CA-9D8E-A62D1A0B7ADB), `sequenceClause` specifies the **log sequence number** in the specified thread. Is this log sequence number same with sequence number that we generate using [CREATE SEQUENCE](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-SEQUENCE.html#GUID-E9C78A8C-615A-4757-B2A8-5E6EFB130571) statement? -- 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627144455 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? +; + +nextClause +: NEXT +; + +allClause +: ALL +; + +toLocationClause +: TO logFileGroupsArchivedLocationName +; + +flushClauseOption +: sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause +; + +disconnectSessionClause +: DISCONNECT SESSION SQ_ numberLiterals COMMA_ numberLiterals SQ_ POST_TRANSACTION? +; + +killSessionClause +: KILL SESSION SQ_ numberLiterals COMMA_ numberLiterals (COMMA_ AT_ numberLiterals)? SQ_ +; + +startRollingMigrationClause +: START ROLLING MIGRATION TO asmVersion +; + +stopRollingMigrationClause +: STOP ROLLING MIGRATION +; + +startRollingPatchClause +: START ROLLING PATCH +; + +stopRollingPatchClause +: STOP ROLLING PATCH +; + +restrictedSessionClause +: (ENABLE | DISABLE) RESTRICTED SESSION +; + +setEncryptionWalletOpenClause +: SET ENCRYPTION WALLET OPEN IDENTIFIED BY (walletPassword | hsmAuthString) +; + +setEncryptionWalletCloseClause +: SET ENCRYPTION WALLET CLOSE (IDENTIFIED BY (walletPassword | hsmAuthString))? +; + +setEncryptionKeyClause +: SET ENCRYPTION KEY (identifiedByWalletPassword | identifiedByHsmAuthString) +; + +enableAffinityClause +: ENABLE AFFINITY tableName (SERVICE serviceName)? +; + +disableAffinityClause +: DISABLE AFFINITY tableName +; + +alterSystemSetClause +: setParameterClause | useStoredOutlinesClause | globalTopicEnabledClause +; + +alterSystemResetClause +: parameterName scopeClause* +; + +sharedPoolClause +: SHARED_POOL +; + +globalContextClause +: GLOBAL CONTEXT +; + +bufferCacheClause +: BUFFER_CACHE +; + +flashCacheClause +: FLASH_CACHE +; + +redoToClause +: REDO TO targetDbName (NO? CONFIRM APPLY)? +; + +identifiedByWalletPassword +: certificateId? IDENTIFIED BY walletPassword Review comment: ![identifiedByWalletPasswordClause](http
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627141925 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? +; + +nextClause +: NEXT +; + +allClause +: ALL +; + +toLocationClause +: TO logFileGroupsArchivedLocationName +; + +flushClauseOption +: sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause +; + +disconnectSessionClause +: DISCONNECT SESSION SQ_ numberLiterals COMMA_ numberLiterals SQ_ POST_TRANSACTION? +; + +killSessionClause +: KILL SESSION SQ_ numberLiterals COMMA_ numberLiterals (COMMA_ AT_ numberLiterals)? SQ_ +; + +startRollingMigrationClause +: START ROLLING MIGRATION TO asmVersion +; + +stopRollingMigrationClause +: STOP ROLLING MIGRATION +; + +startRollingPatchClause +: START ROLLING PATCH +; + +stopRollingPatchClause +: STOP ROLLING PATCH +; + +restrictedSessionClause +: (ENABLE | DISABLE) RESTRICTED SESSION +; + +setEncryptionWalletOpenClause +: SET ENCRYPTION WALLET OPEN IDENTIFIED BY (walletPassword | hsmAuthString) Review comment: ![walletOpenClause](https://user-images.githubusercontent.com/48581379/117255886-d1397400-ae67-11eb-9ef0-698899457128.png) Since I specified `walletPassword` and `hsmAuthString` as `stringLiterals`, I thought when we type either one of these would still be wrapped by double quotes. So I didn't double quotes. -- 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627138284 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? +; + +nextClause +: NEXT +; + +allClause +: ALL +; + +toLocationClause +: TO logFileGroupsArchivedLocationName +; + +flushClauseOption +: sharedPoolClause | globalContextClause | bufferCacheClause | flashCacheClause | redoToClause +; + +disconnectSessionClause +: DISCONNECT SESSION SQ_ numberLiterals COMMA_ numberLiterals SQ_ POST_TRANSACTION? +; + +killSessionClause +: KILL SESSION SQ_ numberLiterals COMMA_ numberLiterals (COMMA_ AT_ numberLiterals)? SQ_ +; + +startRollingMigrationClause +: START ROLLING MIGRATION TO asmVersion Review comment: I specified `asmVersion` as `stringLiterals`, so I didn't add 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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627137559 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName +; + +sequenceClause +: SEQUENCE numberLiterals +; + +changeClause +: CHANGE numberLiterals +; + +currentClause +: CURRENT NOSWITCH? +; + +groupClause +: GROUP numberLiterals +; + +logfileClause +: LOGFILE logFileName (USING BACKUP CONTROLFILE)? Review comment: I specified `logFileName` as `stringLiterals`, so I didn't wrap it with two `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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627131919 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 ## @@ -1421,3 +1421,258 @@ leadCdbUriClause propertyClause : PROPERTY (SET | REMOVE) DEFAULT_CREDENTIAL EQ_ qualifiedCredentialName ; + +alterSystem +: ALTER SYSTEM alterSystemOption +; + +alterSystemOption +: archiveLogClause +| checkpointClause +| checkDatafilesClause +| distributedRecovClauses +| flushClause +| endSessionClauses +| switchLogfileClause +| suspendResumeClause +| quiesceClauses +| rollingMigrationClauses +| rollingPatchClauses +| alterSystemSecuriyClauses +| affinityClauses +| shutdownDispatcherClause +| registerClause +| setClause +| resetClause +| relocateClientClause +| cancelSqlClause +| flushPasswordfileMetadataCacheClause +; + +archiveLogClause +: ARCHIVE LOG instanceClause? (sequenceClause | changeClause | currentClause | groupClause | logfileClause | nextClause | allClause) toLocationClause? +; + +checkpointClause +: CHECKPOINT (GLOBAL | LOCAL)? +; + +checkDatafilesClause +: CHECK DATAFILES (GLOBAL | LOCAL)? +; + +distributedRecovClauses +: (ENABLE | DISABLE) DISTRIBUTED RECOVERY +; + +flushClause +: FLUSH flushClauseOption +; + +endSessionClauses +: (disconnectSessionClause | killSessionClause) (IMMEDIATE | NOREPLY)? +; + +switchLogfileClause +: SWITCH LOGFILE +; + +suspendResumeClause +: SUSPEND | RESUME +; + +quiesceClauses +: QUIESCE RESTRICTED | UNQUIESCE +; + +rollingMigrationClauses +: startRollingMigrationClause | stopRollingMigrationClause +; + +rollingPatchClauses +: startRollingPatchClause | stopRollingPatchClause +; + +alterSystemSecuriyClauses +: restrictedSessionClause | setEncryptionWalletOpenClause | setEncryptionWalletCloseClause | setEncryptionKeyClause +; + +affinityClauses +: enableAffinityClause | disableAffinityClause +; + +shutdownDispatcherClause +: SHUTDOWN IMMEDIATE? dispatcherName +; + +registerClause +: REGISTER +; + +setClause +: SET alterSystemSetClause+ +; + +resetClause +: RESET alterSystemResetClause+ +; + +relocateClientClause +: RELOCATE CLIENT clientId +; + +cancelSqlClause +: CANCEL SQL SQ_ sessionId serialNumber instanceId? sqlId? SQ_ +; + +flushPasswordfileMetadataCacheClause +: FLUSH PASSWORDFILE_METADATA_CACHE +; + +instanceClause +: INSTANCE instanceName Review comment: ![InstanceName](https://user-images.githubusercontent.com/48581379/117254361-ef05d980-ae65-11eb-9be7-1162bed3c9df.png) Since `instanceName` is specified as `STRING_`, I didn't wrap it with two `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: us...@infra.apache.org
[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #10253: Add SQL Definition for `ALTER SYSTEM` of Oracle Database
ThanoshanMV commented on a change in pull request #10253: URL: https://github.com/apache/shardingsphere/pull/10253#discussion_r627121433 ## File path: shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/case/ddl/alter-system.xml ## @@ -0,0 +1,23 @@ + + + + Review comment: Yes, I'll add tests for each rule branch. -- 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: us...@infra.apache.org