Package org.apache.calcite.sql2rel
Class ReflectiveConvertletTable
java.lang.Object
org.apache.calcite.sql2rel.ReflectiveConvertletTable
- All Implemented Interfaces:
SqlRexConvertletTable
- Direct Known Subclasses:
StandardConvertletTable
Implementation of
SqlRexConvertletTable
which uses reflection to call
any method of the form public RexNode convertXxx(ConvertletContext,
SqlNode)
or public RexNode convertXxx(ConvertletContext,
SqlOperator, SqlCall)
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAlias
(SqlOperator alias, SqlOperator target) Registers that one operator is an alias for another.@Nullable SqlRexConvertlet
Returns the convertlet applicable to a given expression.protected void
registerOp
(SqlOperator op, SqlRexConvertlet convertlet) Registers a convertlet for a given operator instance.
-
Constructor Details
-
ReflectiveConvertletTable
public ReflectiveConvertletTable()
-
-
Method Details
-
get
Description copied from interface:SqlRexConvertletTable
Returns the convertlet applicable to a given expression.- Specified by:
get
in interfaceSqlRexConvertletTable
-
registerOp
protected void registerOp(@UnderInitialization ReflectiveConvertletTable this, SqlOperator op, SqlRexConvertlet convertlet) Registers a convertlet for a given operator instance.- Parameters:
op
- Operator instance, saySqlStdOperatorTable.MINUS
convertlet
- Convertlet
-
addAlias
protected void addAlias(@UnderInitialization ReflectiveConvertletTable this, SqlOperator alias, SqlOperator target) Registers that one operator is an alias for another.- Parameters:
alias
- Operator which is aliastarget
- Operator to translate calls to
-