Class JdbcConvention
- All Implemented Interfaces:
Convention
,RelTrait
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 to this convention need to be instantiated, at the start of planning, for each JDBC database in play.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.plan.Convention
Convention.Impl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
Cost of a JDBC node versus implementing an equivalent node in a "typical" calling convention.final SqlDialect
final Expression
Fields inherited from interface org.apache.calcite.plan.Convention
NONE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JdbcConvention
of
(SqlDialect dialect, Expression expression, String name) void
register
(RelOptPlanner planner) Registers a trait instance with the planner.Methods inherited from class org.apache.calcite.plan.Convention.Impl
canConvertConvention, enforce, getInterface, getName, getTraitDef, satisfies, toString, useAbstractConvertersForConversion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.plan.Convention
getRelFactories
-
Field Details
-
COST_MULTIPLIER
public static final double COST_MULTIPLIERCost of a JDBC node versus implementing an equivalent node in a "typical" calling convention.- See Also:
-
dialect
-
expression
-
-
Constructor Details
-
JdbcConvention
-
-
Method Details
-
of
-
register
Description copied from interface:RelTrait
Registers a trait instance with the planner.This is an opportunity to add rules that relate to that trait. However, typical implementations will do nothing.
- Specified by:
register
in interfaceRelTrait
- Overrides:
register
in classConvention.Impl
- Parameters:
planner
- Planner
-