[
https://issues.apache.org/jira/browse/IGNITE-25408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tiago Marques Godinho updated IGNITE-25408:
-------------------------------------------
Labels: ignite-3 (was: )
> 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
> 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)