You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2025/05/22 10:30:00 UTC
[jira] [Assigned] (IGNITE-25408) Catalog API: createTableAsync does not fetch the created table in non-default schema
[ https://issues.apache.org/jira/browse/IGNITE-25408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maksim Zhuravkov reassigned IGNITE-25408:
-----------------------------------------
Assignee: Maksim Zhuravkov
> Catalog API: createTableAsync does not fetch the created table in non-default schema
> ------------------------------------------------------------------------------------
>
> Key: IGNITE-25408
> URL: https://issues.apache.org/jira/browse/IGNITE-25408
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 3.0
> Reporter: Tiago Marques Godinho
> Assignee: Maksim Zhuravkov
> Priority: Major
> Labels: ignite-3
>
> Apparently, the IgniteCatalogSqlImpl#createTableAsync(TableDefinition) method is not handling custom schemas well.
> It seems that it is fetching the newly created table from the table API using only the table name.
> {code:java}
> @Override
> public CompletableFuture<Table> createTableAsync(TableDefinition definition) {
> return new CreateFromDefinitionImpl(sql)
> .from(definition)
> .executeAsync()
> .thenCompose(tableZoneId -> tables.tableAsync(tableZoneId.tableName()));
> } {code}
> When the table is created in a custom schema, the returned result is null.
> The code below fix the behavior in my use-case.
> {code:java}
> @Override
> public CompletableFuture<Table> createTableAsync(TableDefinition definition) {
> return new CreateFromDefinitionImpl(sql)
> .from(definition)
> .executeAsync()
> .thenCompose(tableZoneId -> tables.tableAsync(QualifiedName.of(definition.schemaName(), definition.tableName())));
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)