public class MaterializationService extends Object
| Modifier and Type | Method and Description |
|---|---|
CalciteSchema.TableEntry |
checkValid(MaterializationKey key)
Checks whether a materialization is valid, and if so, returns the table
where the data are stored.
|
void |
clear()
De-registers all materialized tables in the system.
|
MaterializationKey |
defineMaterialization(CalciteSchema schema,
TileKey tileKey,
String viewSql,
List<String> viewSchemaPath,
String suggestedTableName,
boolean create)
Defines a new materialization.
|
Pair<CalciteSchema.TableEntry,TileKey> |
defineTile(Lattice lattice,
ImmutableBitSet groupSet,
List<Lattice.Measure> measureList,
CalciteSchema schema,
boolean create,
boolean exact)
Defines a tile.
|
static MaterializationService |
instance()
Returns the instance of the materialization service.
|
List<Prepare.Materialization> |
query(CalciteSchema rootSchema)
Gathers a list of all materialized tables known within a given root
schema.
|
static void |
setThreadLocal()
Used by tests, to ensure that they see their own service.
|
public MaterializationKey defineMaterialization(CalciteSchema schema, TileKey tileKey, String viewSql, List<String> viewSchemaPath, String suggestedTableName, boolean create)
public CalciteSchema.TableEntry checkValid(MaterializationKey key)
public Pair<CalciteSchema.TableEntry,TileKey> defineTile(Lattice lattice, ImmutableBitSet groupSet, List<Lattice.Measure> measureList, CalciteSchema schema, boolean create, boolean exact)
Setting the create flag to false prevents a materialization
from being created if one does not exist. Critically, it is set to false
during the recursive SQL that populates a materialization. Otherwise a
materialization would try to create itself to populate itself!
public List<Prepare.Materialization> query(CalciteSchema rootSchema)
public void clear()
public static void setThreadLocal()
public static MaterializationService instance()
setThreadLocal() has been called by the current thread).Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.