zstan commented on a change in pull request #9185:
URL: https://github.com/apache/ignite/pull/9185#discussion_r666413327
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java
##########
@@ -226,6 +234,64 @@ private DropTableCommand convertDropTable(SqlDropTable
dropTblNode, PlanningCont
return dropTblCmd;
}
+ /**
+ * Converts a given IgniteSqlAlterTableAddColumn AST to a
AlterTableAddCommand.
+ *
+ * @param alterTblNode Root node of the given AST.
+ * @param ctx Planning context.
+ */
+ private AlterTableAddCommand
convertAlterTableAdd(IgniteSqlAlterTableAddColumn alterTblNode, PlanningContext
ctx) {
+ AlterTableAddCommand alterTblCmd = new AlterTableAddCommand();
+
+ alterTblCmd.schemaName(deriveSchemaName(alterTblNode.name(), ctx));
+ alterTblCmd.tableName(deriveObjectName(alterTblNode.name(), ctx,
"table name"));
+ alterTblCmd.ifTableExists(alterTblNode.ifExists());
+ alterTblCmd.ifColumnNotExists(alterTblNode.ifNotExistsColumn());
+
+ List<ColumnDefinition> cols = new ArrayList<>();
Review comment:
new ArrayList(alterTblNode.size()) more clear ?
--
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]