diff --git a/ui/src/components/PhysDbView.jsx b/ui/src/components/PhysDbView.jsx index 0f853590..509106a6 100644 --- a/ui/src/components/PhysDbView.jsx +++ b/ui/src/components/PhysDbView.jsx @@ -7,6 +7,20 @@ import { sortTablesToHoist, } from "../highlight"; +function addedTables(tables, nextEngine) { + if (nextEngine == null) return []; + const added = []; + const currTableSet = new Set(); + for (const currTable of tables) { + currTableSet.add(currTable.name); + } + for (const table of nextEngine.tables) { + if (currTableSet.has(table.name)) continue; + added.push(table); + } + return added; +} + function PhysDbView({ name, provisioning, @@ -18,6 +32,7 @@ function PhysDbView({ }) { const physDbName = name; const sortedTables = sortTablesToHoist(highlight, physDbName, false, tables); + const addedTablesList = addedTables(tables, nextEngine); return (
))} + {addedTablesList.map(({ name, is_writer }) => ( +