Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
There's а separate ticket for DDL support in patch available state that proposes following Consumer to Predicate changes in TableManager.alter API.
As-Is:
@Override public void alterTable(String name, Consumer<TableChange> tableChange)
To-Be:
@Override public void alterTable(String name, @NotNull Predicate<TableChange> tableChange)
Below is an example of such predicate api usage:
CompletableFuture<Void> fut = tableManager.alterTableAsync(canonicalName, tblCh -> { tblCh.changeColumns( columns -> { Set<String> existCols = columns.namedListKeys().stream().map(k -> columns.get(k).name()) .collect(Collectors.toUnmodifiableSet()); cmd.columns().stream().map(Column::name).filter(existCols::contains) .collect(Collectors.toCollection(() -> issues)); if (issues.isEmpty()) { for (Column col0 : cmd.columns()) columns.create(col0.name(), colChg -> convert(col0, colChg)); } } ); return issues.isEmpty(); });
It's required to verify proposed API changes.
Attachments
Issue Links
- is required by
-
IGNITE-15107 Integrate DDL handler into Ignite 3.0
- Resolved
- links to