Module mz_adapter::catalog::apply
source ยท Expand description
Logic related to applying updates from a mz_catalog::durable::DurableCatalogState
to a
CatalogState
.
Structsยง
- Maintains the state of retractions while applying catalog state updates for a single timestamp.
CatalogState
maintains denormalized state for certain catalog objects. Updating an object results in applying a retraction for that object followed by applying an addition for that object. When applying those additions it can be extremely expensive to re-build that denormalized state from scratch. To avoid that issue we stash the denormalized state from retractions, so it can be used during additions.
Enumsยง
- Bootstrap
Apply ๐State Most updates are applied one at a time, but during bootstrap, certain types are applied separately in a batch for performance reasons. A constraint is that updates must be applied in order. This process is modeled as a state machine that batches then applies groups of updates.
Functionsยง
- Helper method to updated inverted lookup maps. The keys are generally names and the values are generally IDs.
- apply_
with_ ๐update Helper method to update catalog state, that may need to be updated from a previously retracted object. - Looks up a
BuiltinView
from aSystemObjectMapping
. - sort_
updates ๐SortStateUpdate
s in timestamp then dependency order - sort_
updates_ ๐inner SortStateUpdate
s in dependency order for a single timestamp.