chakkk309 commented on code in PR #19537: URL: https://github.com/apache/shardingsphere/pull/19537#discussion_r929215766
########## shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4: ########## @@ -3214,3 +3214,193 @@ forRefreshClause : FOR ((SYNCHRONOUS REFRESH USING stagingLogName) | (FAST REFRESH)) ; +alterPluggableDatabase + : ALTER databaseClause (pdbUnplugClause + | pdbSettingsClauses + | pdbDatafileClause + | pdbRecoveryClauses + | pdbChangeState + | pdbChangeStateFromRoot + | applicationClauses + | snapshotClauses + | prepareClause + | dropMirrorCopy + | lostWriteProtection) + ; + +databaseClause + : DATABASE dbName? + | PLUGGABLE DATABASE pdbName? + ; + +pdbUnplugClause + : pdbName UNPLUG INTO fileName pdbUnplugEncrypt? + ; + +pdbUnplugEncrypt + : ENCRYPT USING transportSecret + ; + +pdbSettingsClauses + : pdbName? pdbSettingCluase + | CONTAINERS containersClause + ; + +pdbSettingCluase + : DEFAULT EDITION EQ_ editionName + | SET DEFAULT (BIGFILE | SMALLFILE) TABLESPACE + | DEFAULT TABLESPACE tablespaceName + | DEFAULT TEMPORARY TABLESPACE (tablespaceName | tablespaceGroupName) + | RENAME GLOBAL_NAME TO databaseName (DOT_ domain)+ + | setTimeZoneClause + | databaseFileClauses + | supplementalDbLogging + | pdbStorageClause + | pdbLoggingClauses + | pdbRefreshModeClause + | REFRESH pdbRefreshSwitchoverClause? Review Comment: According to Oracle's official documentation for [ALTER PLUGGABLE DATABASE](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-PLUGGABLE-DATABASE.html#GUID-A29491AD-8F0F-4E52-9D94-57FC3FF8FBC7), it is found that there are some differences between BNF syntax and .eps syntax for **pdb_settings_clauses**. - in BNF syntax: <img width="395" alt="524f22a107e9c78b9a3b2d49b8d51d0" src="https://user-images.githubusercontent.com/60494790/180854098-a48be7ba-4b1b-4be7-b708-839ac9cc18a8.png"> - in .eps syntax, there is an optional clause after the refresh keyword : <img width="515" alt="a47ae24adfee4b8ac5e8af4b3452a12" src="https://user-images.githubusercontent.com/60494790/180854267-ec43e095-39b2-4b88-90c5-71eabed1b504.png"> I would like to know which kind of syntax should I follow? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org