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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAlias(SqlOperator alias, SqlOperator target) Registers that one operator is an alias for another.@Nullable SqlRexConvertletReturns the convertlet applicable to a given expression.protected voidregisterOp(SqlOperator op, SqlRexConvertlet convertlet) Registers a convertlet for a given operator instance.
-
Constructor Details
-
ReflectiveConvertletTable
public ReflectiveConvertletTable()
-
-
Method Details
-
get
Description copied from interface:SqlRexConvertletTableReturns the convertlet applicable to a given expression.- Specified by:
getin 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.MINUSconvertlet- 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
-