zstan commented on a change in pull request #484: URL: https://github.com/apache/ignite-3/pull/484#discussion_r764578212
########## File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ddl/DdlSqlToCommandConverter.java ########## @@ -157,25 +153,30 @@ private CreateTableCommand convertCreateTable(IgniteSqlCreateTable createTblNode .collect(Collectors.toList()); IgnitePlanner planner = ctx.planner(); + IgniteTypeFactory typeFactory = ctx.typeFactory(); - List<ColumnDefinition> cols = new ArrayList<>(); + List<ColumnDefinition> cols = new ArrayList<>(colDeclarations.size()); for (SqlColumnDeclaration col : colDeclarations) { if (!col.name.isSimple()) { throw new IgniteException("Unexpected value of columnName [" + "expected a simple identifier, but was " + col.name + "; " - + "querySql=\"" + ctx.query() + "\"]"/*, IgniteQueryErrorCode.PARSING*/); + + "querySql=\"" + ctx.query() + "\"]"); } String name = col.name.getSimple(); - RelDataType type = planner.convert(col.dataType); + RelDataType relType = planner.convert(col.dataType); Object dflt = null; if (col.expression != null) { dflt = ((SqlLiteral) col.expression).getValue(); } - cols.add(new ColumnDefinition(name, type, dflt)); + ColumnDefinitionBuilder col0 = SchemaBuilders.column(name, typeFactory.columnType(relType)) Review comment: what`s the purpose of such a change ? the only one goal of chain DdlSqlToCommandConverter -> DdlCommandHandler is to bring ddl info into TableManager ? If we return it to ddl.ColumnDefinition we need additional transformations in DdlCommandHandler code i hope. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org