public class CalcitePrepareImpl extends Object implements CalcitePrepare
This class is public so that projects that create their own JDBC driver and server can fine-tune preferences. However, this class and its methods are subject to change without notice.
CalcitePrepare.CalciteSignature<T>, CalcitePrepare.Context, CalcitePrepare.ConvertResult, CalcitePrepare.Dummy, CalcitePrepare.ParseResult, CalcitePrepare.SparkHandler| Modifier and Type | Field and Description |
|---|---|
static boolean |
COMMUTE |
static boolean |
DEBUG |
static boolean |
ENABLE_BINDABLE
Whether the bindable convention should be the root convention of any
plan.
|
static boolean |
ENABLE_ENUMERABLE
Whether the enumerable convention is enabled.
|
static boolean |
ENABLE_STREAM
Whether the streaming is enabled.
|
DEFAULT_FACTORY, THREAD_CONTEXT_STACK| Constructor and Description |
|---|
CalcitePrepareImpl() |
public static final boolean DEBUG
public static final boolean COMMUTE
public static final boolean ENABLE_BINDABLE
public static final boolean ENABLE_ENUMERABLE
public static final boolean ENABLE_STREAM
public CalcitePrepare.ParseResult parse(CalcitePrepare.Context context, String sql)
parse in interface CalcitePreparepublic CalcitePrepare.ConvertResult convert(CalcitePrepare.Context context, String sql)
convert in interface CalcitePrepareprotected List<Function1<CalcitePrepare.Context,RelOptPlanner>> createPlannerFactories()
The collection must have at least one factory, and each factory must create a planner. If the collection has more than one planner, Calcite will try each planner in turn.
One of the things you can do with this mechanism is to try a simpler, faster, planner with a smaller rule set first, then fall back to a more complex planner for complex and costly queries.
The default implementation returns a factory that calls
createPlanner(org.apache.calcite.jdbc.CalcitePrepare.Context).
protected RelOptPlanner createPlanner(CalcitePrepare.Context prepareContext)
protected RelOptPlanner createPlanner(CalcitePrepare.Context prepareContext, Context externalContext, RelOptCostFactory costFactory)
public <T> CalcitePrepare.CalciteSignature<T> prepareQueryable(CalcitePrepare.Context context, Queryable<T> queryable)
prepareQueryable in interface CalcitePreparepublic <T> CalcitePrepare.CalciteSignature<T> prepareSql(CalcitePrepare.Context context, String sql, Queryable<T> expression, Type elementType, int maxRowCount)
prepareSql in interface CalcitePrepareprotected void populateMaterializations(CalcitePrepare.Context context, RelOptPlanner planner, Prepare.Materialization materialization)
public <R> R perform(CalciteServerStatement statement, Frameworks.PrepareAction<R> action)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.