Package org.apache.calcite.sql2rel
Class SqlNodeToRexConverterImpl
- java.lang.Object
-
- org.apache.calcite.sql2rel.SqlNodeToRexConverterImpl
-
- All Implemented Interfaces:
SqlNodeToRexConverter
public class SqlNodeToRexConverterImpl extends java.lang.Object implements SqlNodeToRexConverter
Standard implementation ofSqlNodeToRexConverter
.
-
-
Field Summary
Fields Modifier and Type Field Description private SqlRexConvertletTable
convertletTable
-
Constructor Summary
Constructors Constructor Description SqlNodeToRexConverterImpl(SqlRexConvertletTable convertletTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RexNode
convertCall(SqlRexContext cx, SqlCall call)
RexLiteral
convertInterval(SqlRexContext cx, SqlIntervalQualifier intervalQualifier)
Converts aSQL Interval Qualifier
to aREX literal
.RexNode
convertLiteral(SqlRexContext cx, SqlLiteral literal)
Converts aSQL literal
to aREX literal
.
-
-
-
Field Detail
-
convertletTable
private final SqlRexConvertletTable convertletTable
-
-
Constructor Detail
-
SqlNodeToRexConverterImpl
SqlNodeToRexConverterImpl(SqlRexConvertletTable convertletTable)
-
-
Method Detail
-
convertCall
public RexNode convertCall(SqlRexContext cx, SqlCall call)
Description copied from interface:SqlNodeToRexConverter
- Specified by:
convertCall
in interfaceSqlNodeToRexConverter
-
convertInterval
public RexLiteral convertInterval(SqlRexContext cx, SqlIntervalQualifier intervalQualifier)
Description copied from interface:SqlNodeToRexConverter
Converts aSQL Interval Qualifier
to aREX literal
.- Specified by:
convertInterval
in interfaceSqlNodeToRexConverter
-
convertLiteral
public RexNode convertLiteral(SqlRexContext cx, SqlLiteral literal)
Description copied from interface:SqlNodeToRexConverter
Converts aSQL literal
to aREX literal
.The result is
RexNode
, notRexLiteral
because if the literal is NULL (or the boolean Unknown value), we make aCAST(NULL AS type)
expression.- Specified by:
convertLiteral
in interfaceSqlNodeToRexConverter
-
-