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/16 14:42:18 UTC

[GitHub] [shardingsphere] ThanoshanMV opened a new pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

ThanoshanMV opened a new pull request #10117:
URL: https://github.com/apache/shardingsphere/pull/10117


   #10111
   
   Hi @tristaZero, @wgy8283335 I've added SQL definition for [ALTER SESSION](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SESSION.html#GUID-27186B28-7EFC-4998-B1ED-2B905CC0211B). Please check it. I'll change based on your feedback. 
   
   Changes proposed in this pull request:
   - Added SQL definition for `ALTER SESSION`
   - Added test cases for `ALTER SESSION`
   


-- 
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] ThanoshanMV commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY
+    | alterSessionSetClause
+    ;
+
+adviseClause
+    : ADVISE (COMMIT | ROLLBACK | NOTHING)
+    ;
+
+closeDatabaseLinkClause
+    : CLOSE DATABASE LINK dbLink
+    ;
+
+commitInProcedureClause
+    : (ENABLE | DISABLE) COMMIT IN PROCEDURE
+    ;
+
+securiyClause
+    : (ENABLE | DISABLE) GUARD
+    ;
+
+parallelExecutionClause
+    : (ENABLE | DISABLE | FORCE) PARALLEL (DML | DDL | QUERY) (PARALLEL numberLiterals)?
+    ;
+
+resumableClause
+    : enableResumableClause | disableResumableClause
+    ;
+
+enableResumableClause
+    : ENABLE RESUMABLE (TIMEOUT numberLiterals)? (NAME stringLiterals)?
+    ;
+
+disableResumableClause
+    : DISABLE RESUMABLE
+    ;
+
+shardDdlClause
+    : (ENABLE | DISABLE) SHARD DDL
+    ;
+
+alterSessionSetClause
+    : SET alterSessionSetClauseOption
+    ;
+
+alterSessionSetClauseOption
+    : parameterClause
+    | editionClause
+    | containerClause
+    | rowArchivalVisibilityClause
+    | defaultCollationClause
+    ;
+
+parameterClause
+    : (parameterName EQ_ parameterValue)+
+    ;
+
+parameterValue

Review comment:
       Okay @wgy8283335, I'll put `parameterValue` in BaseRule.g4.
   
   Based on [ALTER SESSION documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SESSION.html#GUID-27186B28-7EFC-4998-B1ED-2B905CC0211B), we can set two types of parameters: [initialization](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SESSION.html#GUID-8DBA8659-413E-49B4-98D3-D9608C9C8026) and [session parameters](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SESSION.html#GUID-DC7B8CDD-4F89-40CC-875F-F70F673711D4). 
   
   [Basic initialization parameters](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/basic-initialization-parameters.html#GUID-D75F1A77-47E2-4F35-B145-44B3A10ED85C) such as [CLUSTER_DATABASE](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/CLUSTER_DATABASE.html#GUID-DA4B6C11-FFEA-46BE-82D7-13C1DBD36277)'s parameter value is boolean,  [DB_BLOCK_SIZE](https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/DB_BLOCK_SIZE.html#GUID-6DD6D804-D03D-4C57-A764-826EE0F3836B)'s parameter value is an integer. 
   
   [Session parameters](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-SESSION.html#GUID-DC7B8CDD-4F89-40CC-875F-F70F673711D4) such as `INSTANCE`'s parameter value is an integer, `CURRENT_SCHEMA` is an identifier, `TIME_ZONE` is having a string literal as the parameter value. 
   
   To include all of this, I specified the `parameterValue` as `literals | identifier`. I just checked for which values they can contain. Please correct me if I'm wrong.
   
   




-- 
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] wgy8283335 commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY
+    | alterSessionSetClause
+    ;
+
+adviseClause
+    : ADVISE (COMMIT | ROLLBACK | NOTHING)
+    ;
+
+closeDatabaseLinkClause
+    : CLOSE DATABASE LINK dbLink
+    ;
+
+commitInProcedureClause
+    : (ENABLE | DISABLE) COMMIT IN PROCEDURE
+    ;
+
+securiyClause
+    : (ENABLE | DISABLE) GUARD
+    ;
+
+parallelExecutionClause
+    : (ENABLE | DISABLE | FORCE) PARALLEL (DML | DDL | QUERY) (PARALLEL numberLiterals)?
+    ;
+
+resumableClause
+    : enableResumableClause | disableResumableClause
+    ;
+
+enableResumableClause
+    : ENABLE RESUMABLE (TIMEOUT numberLiterals)? (NAME stringLiterals)?
+    ;
+
+disableResumableClause
+    : DISABLE RESUMABLE
+    ;
+
+shardDdlClause
+    : (ENABLE | DISABLE) SHARD DDL
+    ;
+
+alterSessionSetClause
+    : SET alterSessionSetClauseOption
+    ;
+
+alterSessionSetClauseOption
+    : parameterClause
+    | editionClause
+    | containerClause
+    | rowArchivalVisibilityClause
+    | defaultCollationClause
+    ;
+
+parameterClause
+    : (parameterName EQ_ parameterValue)+
+    ;
+
+parameterValue

Review comment:
       Why `parameterValue` is identified as `literals | identifier`?




-- 
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] wgy8283335 commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY
+    | alterSessionSetClause
+    ;
+
+adviseClause
+    : ADVISE (COMMIT | ROLLBACK | NOTHING)
+    ;
+
+closeDatabaseLinkClause
+    : CLOSE DATABASE LINK dbLink
+    ;
+
+commitInProcedureClause
+    : (ENABLE | DISABLE) COMMIT IN PROCEDURE
+    ;
+
+securiyClause
+    : (ENABLE | DISABLE) GUARD
+    ;
+
+parallelExecutionClause
+    : (ENABLE | DISABLE | FORCE) PARALLEL (DML | DDL | QUERY) (PARALLEL numberLiterals)?
+    ;
+
+resumableClause
+    : enableResumableClause | disableResumableClause
+    ;
+
+enableResumableClause
+    : ENABLE RESUMABLE (TIMEOUT numberLiterals)? (NAME stringLiterals)?
+    ;
+
+disableResumableClause
+    : DISABLE RESUMABLE
+    ;
+
+shardDdlClause
+    : (ENABLE | DISABLE) SHARD DDL
+    ;
+
+alterSessionSetClause
+    : SET alterSessionSetClauseOption
+    ;
+
+alterSessionSetClauseOption
+    : parameterClause
+    | editionClause
+    | containerClause
+    | rowArchivalVisibilityClause
+    | defaultCollationClause
+    ;
+
+parameterClause
+    : (parameterName EQ_ parameterValue)+
+    ;
+
+parameterValue

Review comment:
       Thank you for your explanation. I've got 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] tristaZero commented on pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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


   > @tristaZero shall we merge the pr?
   
   Merged. Thanks everyone.


-- 
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] ThanoshanMV commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY

Review comment:
       Yes, we can put it in a rule. I'll put it in a rule like: 
   ```
   syncWithPrimaryClause: SYNC WITH PRIMARY
   ```




-- 
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 #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10117?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 [#10117](https://codecov.io/gh/apache/shardingsphere/pull/10117?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3437844) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c09d7b063377b006c4aa55e840fea5ca2b8eeec5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c09d7b0) will **decrease** coverage by `0.00%`.
   > The diff coverage is `66.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10117/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/10117?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   #10117      +/-   ##
   ============================================
   - Coverage     68.00%   68.00%   -0.01%     
     Complexity      680      680              
   ============================================
     Files          1694     1695       +1     
     Lines         29048    29051       +3     
     Branches       5199     5199              
   ============================================
   + Hits          19754    19756       +2     
   - Misses         7783     7784       +1     
     Partials       1511     1511              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10117?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 Δ | |
   |---|---|---|---|
   | [...tement/oracle/ddl/OracleAlterSessionStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10117/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvb3JhY2xlL2RkbC9PcmFjbGVBbHRlclNlc3Npb25TdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...r/statement/impl/OracleDDLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10117/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.29% <100.00%> (+0.13%)` | `1.00 <0.00> (ø)` | |
   | [...sphere/sql/parser/core/visitor/SQLVisitorRule.java](https://codecov.io/gh/apache/shardingsphere/pull/10117/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWVuZ2luZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9jb3JlL3Zpc2l0b3IvU1FMVmlzaXRvclJ1bGUuamF2YQ==) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10117?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/10117?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 [c09d7b0...3437844](https://codecov.io/gh/apache/shardingsphere/pull/10117?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] wgy8283335 commented on pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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


   I'd like to 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] tristaZero merged pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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


   


-- 
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] wgy8283335 commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY

Review comment:
       Why not put `SYNC WITH PRIMARY` in a rule?

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY
+    | alterSessionSetClause
+    ;
+
+adviseClause
+    : ADVISE (COMMIT | ROLLBACK | NOTHING)
+    ;
+
+closeDatabaseLinkClause
+    : CLOSE DATABASE LINK dbLink
+    ;
+
+commitInProcedureClause
+    : (ENABLE | DISABLE) COMMIT IN PROCEDURE
+    ;
+
+securiyClause
+    : (ENABLE | DISABLE) GUARD
+    ;
+
+parallelExecutionClause
+    : (ENABLE | DISABLE | FORCE) PARALLEL (DML | DDL | QUERY) (PARALLEL numberLiterals)?
+    ;
+
+resumableClause
+    : enableResumableClause | disableResumableClause
+    ;
+
+enableResumableClause
+    : ENABLE RESUMABLE (TIMEOUT numberLiterals)? (NAME stringLiterals)?
+    ;
+
+disableResumableClause
+    : DISABLE RESUMABLE
+    ;
+
+shardDdlClause
+    : (ENABLE | DISABLE) SHARD DDL
+    ;
+
+alterSessionSetClause
+    : SET alterSessionSetClauseOption
+    ;
+
+alterSessionSetClauseOption
+    : parameterClause
+    | editionClause
+    | containerClause
+    | rowArchivalVisibilityClause
+    | defaultCollationClause
+    ;
+
+parameterClause
+    : (parameterName EQ_ parameterValue)+
+    ;
+
+parameterValue

Review comment:
       Why `parameterValue` is identified like this? and maybe put it in BaseRule.g4 is 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] wgy8283335 commented on pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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


   @tristaZero shall we merge the 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] ThanoshanMV commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY

Review comment:
       I've finished it @wgy8283335 




-- 
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] wgy8283335 commented on a change in pull request #10117: Add SQL Definition for `ALTER SESSION` of Oracle Database

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



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -998,3 +998,91 @@ supplementalLogGrpClause
 supplementalIdKeyClause
     : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
     ;
+
+alterSession
+    : ALTER SESSION alterSessionOption
+    ;
+
+alterSessionOption
+    : adviseClause
+    | closeDatabaseLinkClause
+    | commitInProcedureClause
+    | securiyClause
+    | parallelExecutionClause
+    | resumableClause
+    | shardDdlClause
+    | SYNC WITH PRIMARY

Review comment:
       Good. After you finished, tell me, please.




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