public final class InMemoryCatalogOverlay extends Object implements CatalogOverlay
CatalogOverlay implementation. Holds DDL discovered mid-batch, temp
tables, and user-driven additions. Lookups follow the same precedence the resolver
uses (overlay first, snapshot second) and use the same CatalogIdentifierPolicy
key + areEqual fallback as InMemoryCatalogSnapshot.
Plan §7.2 / §10.5. Per-parse-batch lifecycle managed by the caller via clear();
provider.refresh(...) never disturbs overlay state.
This implementation is not thread-safe; concurrent parsers should use one overlay per analysis run (the standard pattern).
| Constructor and Description |
|---|
InMemoryCatalogOverlay() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Per-parse-batch lifecycle.
|
Optional<CatalogEntry> |
find(CatalogQualifiedName name,
CatalogObjectKind kind) |
boolean |
isEmpty()
Whether the overlay holds any entries.
|
void |
put(CatalogEntry entry) |
int |
size()
Total entry count.
|
public InMemoryCatalogOverlay()
public void put(CatalogEntry entry)
put in interface CatalogOverlaypublic Optional<CatalogEntry> find(CatalogQualifiedName name, CatalogObjectKind kind)
find in interface CatalogOverlaypublic void clear()
CatalogOverlayclear in interface CatalogOverlaypublic int size()
public boolean isEmpty()