xtern commented on code in PR #5478: URL: https://github.com/apache/ignite-3/pull/5478#discussion_r2010394624
########## modules/catalog-dsl/src/main/java/org/apache/ignite/internal/catalog/sql/TableDefinitionCollector.java: ########## @@ -70,35 +63,60 @@ CompletableFuture<TableDefinition> collectDefinition() { if (builder == null) { return nullCompletedFuture(); } else { - return collectIndexes(builder).thenCompose(this::collectColumns).thenApply(Builder::build); + return collectIndexes(builder).thenApply(Builder::build); } }); } private CompletableFuture<TableDefinitionBuilderWithIndexId> collectTableInfo() { - List<Option> options = List.of( - schemaName(tableName.schemaName()), - tableName(tableName.objectName()) - ); - - return new SelectFromView<>(sql, TABLE_VIEW_COLUMNS, "TABLES", options, row -> { - String schema = row.stringValue("SCHEMA"); - int indexId = row.intValue("PK_INDEX_ID"); - String zone = row.stringValue("ZONE"); - String colocationColumns = row.stringValue("COLOCATION_KEY_INDEX"); - Builder builder = TableDefinition.builder(tableName.objectName()).schema(schema) - .zone(zone) - .colocateBy(splitByComma(colocationColumns)); - return new TableDefinitionBuilderWithIndexId(builder, indexId); - }).executeAsync().thenApply(definitions -> { - if (definitions.isEmpty()) { - return null; - } - - assert definitions.size() == 1; - - return definitions.get(0); - }); + String query = "SELECT " + + "pk_index_id, zone_name, column_name, column_type, column_precision, column_scale, column_length, is_nullable_column, " + + "column_ordinal, colocation_column_ordinal " Review Comment: ```suggestion + "colocation_column_ordinal " ``` -- 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