public class JsonLattice
extends java.lang.Object
Occurs within JsonSchema.lattices
.
Description of schema elements
Modifier and Type | Field and Description |
---|---|
boolean |
algorithm
Whether to use an optimization algorithm to suggest and populate an
initial set of tiles.
|
long |
algorithmMaxMillis
Maximum time (in milliseconds) to run the algorithm.
|
boolean |
auto
Whether to materialize tiles on demand as queries are executed.
|
java.util.List<JsonMeasure> |
defaultMeasures
List of measures that a tile should have by default.
|
java.lang.String |
name
The name of this lattice.
|
java.lang.Double |
rowCountEstimate
Estimated number of rows.
|
java.lang.Object |
sql
SQL query that defines the lattice.
|
java.lang.String |
statisticProvider
Name of a class that provides estimates of the number of distinct values
in each column.
|
java.util.List<JsonTile> |
tiles
List of materialized aggregates to create up front.
|
Constructor and Description |
---|
JsonLattice() |
Modifier and Type | Method and Description |
---|---|
void |
accept(ModelHandler handler) |
private static java.lang.String |
concatenate(java.util.List list)
Converts a list of strings into a multi-line string.
|
java.lang.String |
getSql()
Returns the SQL query as a string, concatenating a list of lines if
necessary.
|
java.lang.String |
toString() |
(package private) static java.lang.String |
toString(java.lang.Object o)
Converts a string or a list of strings to a string.
|
void |
visitChildren(ModelHandler modelHandler) |
public java.lang.String name
Required.
public java.lang.Object sql
Must be a string or a list of strings (which are concatenated into a multi-line SQL string, separated by newlines).
The structure of the SQL statement, and in particular the order of items in the FROM clause, defines the fact table, dimension tables, and join paths for this lattice.
public boolean auto
Optional; default is true.
public boolean algorithm
Optional; default is false.
public long algorithmMaxMillis
Optional; default is -1, meaning no timeout.
When the timeout is reached, Calcite uses the best result that has been obtained so far.
public java.lang.Double rowCountEstimate
If null, Calcite will a query to find the real value.
public java.lang.String statisticProvider
The class must implement the
LatticeStatisticProvider
interface.
Or, you can use a class name plus a static field, for example "org.apache.calcite.materialize.Lattices#CACHING_SQL_STATISTIC_PROVIDER".
If not set, Calcite will generate and execute a SQL query to find the real value, and cache the results.
public final java.util.List<JsonTile> tiles
public java.util.List<JsonMeasure> defaultMeasures
A tile can define its own measures, including measures not in this list.
Optional. The default list is just "count(*)".
public void accept(ModelHandler handler)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSql()
static java.lang.String toString(java.lang.Object o)
private static java.lang.String concatenate(java.util.List list)
public void visitChildren(ModelHandler modelHandler)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.