public class MaterializedViewsCache extends Object
HiveRelOptMaterializations.
Materialization can be lookup by
- the Materialized View fully qualified name
- query text.
This implementation contains two ConcurrentHashMap one for name based and one for query text based lookup.
The map contents are synchronized during each dml operation: Dml operations are performed initially on the map
which provides name based lookup. The map which provides query text based lookup is updated by lambda expressions
passed to ConcurrentHashMap.compute(Object, BiFunction).| Constructor and Description |
|---|
MaterializedViewsCache() |
| Modifier and Type | Method and Description |
|---|---|
List<HiveRelOptMaterialization> |
get(ASTNode astNode) |
boolean |
isEmpty() |
void |
putIfAbsent(Table materializedViewTable,
HiveRelOptMaterialization materialization) |
void |
refresh(Table oldMaterializedViewTable,
Table materializedViewTable,
HiveRelOptMaterialization newMaterialization) |
void |
remove(String dbName,
String tableName) |
void |
remove(Table materializedViewTable) |
List<HiveRelOptMaterialization> |
values() |
public void putIfAbsent(Table materializedViewTable, HiveRelOptMaterialization materialization)
public void refresh(Table oldMaterializedViewTable, Table materializedViewTable, HiveRelOptMaterialization newMaterialization)
public void remove(Table materializedViewTable)
public List<HiveRelOptMaterialization> values()
public List<HiveRelOptMaterialization> get(ASTNode astNode)
public boolean isEmpty()
Copyright © 2024 The Apache Software Foundation. All rights reserved.