public class JdbcConvention extends Convention.Impl
The convention is a slight misnomer. The operations occur in whatever data-flow architecture the database uses internally. Nevertheless, the result pops out in JDBC.
This is the only convention, thus far, that is not a singleton. Each instance contains a JDBC schema (and therefore a data source). If Calcite is working with two different databases, it would even make sense to convert from "JDBC#A" convention to "JDBC#B", even though we don't do it currently. (That would involve asking database B to open a database link to database A.)
As a result, converter rules from and two this convention need to be instantiated, at the start of planning, for each JDBC database in play.
Convention.Impl| Modifier and Type | Field and Description |
|---|---|
static double |
COST_MULTIPLIER
Cost of a JDBC node versus implementing an equivalent node in a "typical"
calling convention.
|
SqlDialect |
dialect |
Expression |
expression |
NONE| Constructor and Description |
|---|
JdbcConvention(SqlDialect dialect,
Expression expression,
String name) |
| Modifier and Type | Method and Description |
|---|---|
static JdbcConvention |
of(SqlDialect dialect,
Expression expression,
String name) |
void |
register(RelOptPlanner planner)
Registers a trait instance with the planner.
|
getInterface, getName, getTraitDef, satisfies, toStringpublic static final double COST_MULTIPLIER
public final SqlDialect dialect
public final Expression expression
public JdbcConvention(SqlDialect dialect, Expression expression, String name)
public static JdbcConvention of(SqlDialect dialect, Expression expression, String name)
public void register(RelOptPlanner planner)
RelTraitThis is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing.
register in interface RelTraitregister in class Convention.Implplanner - PlannerCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.