snuyanzin commented on code in PR #27256:
URL: https://github.com/apache/flink/pull/27256#discussion_r2549251376


##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/ddl/SqlAlterModel.java:
##########
@@ -18,47 +18,28 @@
 
 package org.apache.flink.sql.parser.ddl;
 
-import org.apache.calcite.sql.SqlCall;
 import org.apache.calcite.sql.SqlIdentifier;
 import org.apache.calcite.sql.SqlKind;
-import org.apache.calcite.sql.SqlOperator;
 import org.apache.calcite.sql.SqlSpecialOperator;
 import org.apache.calcite.sql.SqlWriter;
 import org.apache.calcite.sql.parser.SqlParserPos;
 
-import static java.util.Objects.requireNonNull;
-
 /**
  * Abstract class to describe statements like ALTER MODEL [IF EXISTS] 
[[catalogName.]
  * dataBasesName.]modelName ...
  */
-public abstract class SqlAlterModel extends SqlCall {
+public abstract class SqlAlterModel extends SqlAlterObject {
 
-    public static final SqlSpecialOperator OPERATOR =
+    private static final SqlSpecialOperator OPERATOR =
             new SqlSpecialOperator("ALTER MODEL", SqlKind.OTHER_DDL);
 
-    protected final SqlIdentifier modelName;
     protected final boolean ifModelExists;
 
     public SqlAlterModel(SqlParserPos pos, SqlIdentifier modelName, boolean 
ifModelExists) {
-        super(pos);
-        this.modelName = requireNonNull(modelName, "modelName should not be 
null");
+        super(OPERATOR, pos, "MODEL", modelName);

Review Comment:
   Calcite will know that it should unparse as `ALTER MODEL ...` 
   
   for more details take a look at 
https://github.com/apache/calcite/blob/49fa3edbb98e3f01fccc028c517e8abf78c1f49f/core/src/main/java/org/apache/calcite/sql/SqlAlter.java



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