Class JdbcConvention

java.lang.Object
org.apache.calcite.plan.Convention.Impl
org.apache.calcite.adapter.jdbc.JdbcConvention
All Implemented Interfaces:
Convention, RelTrait

public class JdbcConvention extends Convention.Impl
Calling convention for relational operations that occur in a JDBC database.

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.

  • Field Details

    • COST_MULTIPLIER

      public static final double COST_MULTIPLIER
      Cost of a JDBC node versus implementing an equivalent node in a "typical" calling convention.
      See Also:
    • dialect

      public final SqlDialect dialect
    • expression

      public final Expression expression
  • Constructor Details

  • Method Details