strongduanmu commented on code in PR #18977:
URL: https://github.com/apache/shardingsphere/pull/18977#discussion_r917834311


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -2735,3 +2735,28 @@ databaseVaultAction
 roleAuditClause
     : ROLES roleName (COMMA_ roleName)*
     ;
+
+alterIndexType
+    : ALTER INDEXTYPE indextypeName ((addOrDropClause (COMMA_ 
addOrDropClause)* usingTypeClause?) | COMPILE) withLocalClause
+    ;
+
+addOrDropClause
+    : (ADD | DROP) operatorName LP_ parameterTypes RP_
+    ;
+
+usingTypeClause
+    : USING implementationType arrayDMLClause?
+    ;
+
+withLocalClause
+    :  (WITH LOCAL RANGE? PARTITION)? storageTableClause?

Review Comment:
   Please keep one space after colon.



##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDDLStatementSQLVisitor.java:
##########
@@ -901,9 +903,14 @@ public ASTNode visitAlterMaterializedZonemap(final 
AlterMaterializedZonemapConte
     public ASTNode visitAlterJava(final AlterJavaContext ctx) {
         return new OracleAlterJavaStatement();
     }
-    

Review Comment:
   Please execute `mvn spotless:apply` on your local machine to format code.



##########
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterIndexTypeStatement.java:
##########
@@ -0,0 +1,28 @@
+/*
+ * 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 
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter index type statement.
+ */
+
+public final class OracleAlterIndexTypeStatement extends AbstractSQLStatement 
implements OracleStatement {

Review Comment:
   In addition, is it possible to add the index name in 
OracleAlterIndexTypeStatement? In sharding feature, ShardingSphere will rewrite 
the index name.



##########
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleAlterIndexTypeStatement.java:
##########
@@ -0,0 +1,28 @@
+/*
+ * 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 
org.apache.shardingsphere.sql.parser.sql.common.statement.AbstractSQLStatement;
+import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.OracleStatement;
+
+/**
+ * Oracle alter index type statement.
+ */
+
+public final class OracleAlterIndexTypeStatement extends AbstractSQLStatement 
implements OracleStatement {

Review Comment:
   @chakkk309 Please add @ToString annotation for 
OracleAlterIndexTypeStatement. When the user turns on the `sql-show` parameter, 
the object string should be printed, not the memory address.



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