zihaoAK47 commented on code in PR #28059:
URL: https://github.com/apache/shardingsphere/pull/28059#discussion_r1292349200


##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -295,7 +295,7 @@ identityOption
     ;
 
 encryptionSpecification
-    : (USING STRING_)? (IDENTIFIED BY STRING_)? STRING_? (NO? SALT)?
+    : (USING STRING_)? (IDENTIFIED BY STRING_)? (integrityAlgorithm? (NO? 
SALT)? | (NO? SALT)? integrityAlgorithm?)   

Review Comment:
   Test execution:
   
   SQL> ALTER TABLE mytable ADD (online_acct_pw VARCHAR2(8) ENCRYPT NO SALT 
'NOMAC');
   ALTER TABLE mytable ADD (online_acct_pw VARCHAR2(8) ENCRYPT NO SALT 'NOMAC')
                            *
   ERROR at line 1:
   ORA-28336: cannot encrypt SYS owned objects
   
   
   SQL> ALTER TABLE mytable ADD (online_acct_pw VARCHAR2(8) ENCRYPT 'NOMAC' NO 
SALT);
   ALTER TABLE mytable ADD (online_acct_pw VARCHAR2(8) ENCRYPT 'NOMAC' NO SALT)
                            *
   ERROR at line 1:
   ORA-28336: cannot encrypt SYS owned objects



##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -427,7 +427,7 @@ alterTableProperties
     | parallelClause
     | rowMovementClause
     | logicalReplicationClause
-    | flashbackArchiveClause)+ | renameTableSpecification) alterIotClauses? 
alterXMLSchemaClause?
+    | flashbackArchiveClause)+ | renameTableSpecification)? alterIotClauses? 
alterXMLSchemaClause?

Review Comment:
   SQL> ALTER TABLE mytable ADD OVERFLOW TABLESPACE admin_tbs2;
   ALTER TABLE mytable ADD OVERFLOW TABLESPACE admin_tbs2
               *
   ERROR at line 1:
   ORA-28658: This operation is supported only for Index-Organized tables



##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -673,11 +673,11 @@ memOptimizeWriteClause
     ;
 
 enableDisableClauses
-    : (enableDisableClause | enableDisableOthers)?
+    : (enableDisableClause | enableDisableOthers)+

Review Comment:
   
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-TABLE.html#GUID-552E7373-BF93-477D-9DA3-B2C9386F2877
   
   SQL> ALTER TABLE mytable ENABLE NOVALIDATE PRIMARY KEY ENABLE NOVALIDATE 
CONSTRAINT emp_last_name_nn;
   ALTER TABLE mytable ENABLE NOVALIDATE PRIMARY KEY ENABLE NOVALIDATE 
CONSTRAINT emp_last_name_nn
   *
   ERROR at line 1:
   ORA-02430: cannot enable constraint (EMP_LAST_NAME_NN) - no such constraint



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to