| Modifier and Type | Field and Description |
|---|---|
private boolean |
algorithm |
private long |
algorithmMaxMillis |
private boolean |
auto |
private com.google.common.collect.ImmutableList<Lattice.Column> |
columns |
private com.google.common.collect.ImmutableListMultimap<String,Lattice.Column> |
columnsByAlias |
private com.google.common.collect.ImmutableList.Builder<Lattice.Measure> |
defaultMeasureListBuilder |
private List<Lattice.Node> |
nodes |
private CalciteSchema |
rootSchema |
private Double |
rowCountEstimate |
private String |
statisticProvider |
private com.google.common.collect.ImmutableList.Builder<Lattice.Tile> |
tileListBuilder |
| Constructor and Description |
|---|
Builder(CalciteSchema schema,
String sql) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMeasure(Lattice.Measure measure) |
void |
addTile(Lattice.Tile tile) |
Lattice.Builder |
algorithm(boolean algorithm)
Sets the "algorithm" attribute (default false).
|
Lattice.Builder |
algorithmMaxMillis(long algorithmMaxMillis)
Sets the "algorithmMaxMillis" attribute (default -1).
|
Lattice.Builder |
auto(boolean auto)
Sets the "auto" attribute (default true).
|
Lattice |
build()
Builds a lattice.
|
private SqlAggFunction |
resolveAgg(String aggName) |
com.google.common.collect.ImmutableList<Lattice.Column> |
resolveArgs(Object args)
Resolves the arguments of a
JsonMeasure. |
Lattice.Column |
resolveColumn(Object name) |
private Lattice.Column |
resolveColumnByAlias(String name)
Looks up a column in this lattice by alias.
|
Lattice.Measure |
resolveMeasure(String aggName,
Object args) |
private Lattice.Column |
resolveQualifiedColumn(String table,
String column) |
Lattice.Builder |
rowCountEstimate(double rowCountEstimate)
Sets the "rowCountEstimate" attribute (default null).
|
Lattice.Builder |
statisticProvider(String statisticProvider)
Sets the "statisticProvider" attribute.
|
private final List<Lattice.Node> nodes
private final com.google.common.collect.ImmutableList<Lattice.Column> columns
private final com.google.common.collect.ImmutableListMultimap<String,Lattice.Column> columnsByAlias
private final com.google.common.collect.ImmutableList.Builder<Lattice.Measure> defaultMeasureListBuilder
private final com.google.common.collect.ImmutableList.Builder<Lattice.Tile> tileListBuilder
private final CalciteSchema rootSchema
private boolean algorithm
private long algorithmMaxMillis
private boolean auto
private Double rowCountEstimate
private String statisticProvider
public Builder(CalciteSchema schema, String sql)
public Lattice.Builder auto(boolean auto)
public Lattice.Builder algorithm(boolean algorithm)
public Lattice.Builder algorithmMaxMillis(long algorithmMaxMillis)
public Lattice.Builder rowCountEstimate(double rowCountEstimate)
public Lattice.Builder statisticProvider(String statisticProvider)
If not set, the lattice will use Lattices.CACHED_SQL.
public Lattice build()
public com.google.common.collect.ImmutableList<Lattice.Column> resolveArgs(Object args)
JsonMeasure. They must either be null,
a string, or a list of strings. Throws if the structure is invalid, or if
any of the columns do not exist in the lattice.private Lattice.Column resolveColumnByAlias(String name)
public Lattice.Column resolveColumn(Object name)
private Lattice.Column resolveQualifiedColumn(String table, String column)
public Lattice.Measure resolveMeasure(String aggName, Object args)
private SqlAggFunction resolveAgg(String aggName)
public void addMeasure(Lattice.Measure measure)
public void addTile(Lattice.Tile tile)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.