org.eigenbase.sql2rel
Class SqlNodeToRexConverterImpl

java.lang.Object
  extended by org.eigenbase.sql2rel.SqlNodeToRexConverterImpl
All Implemented Interfaces:
SqlNodeToRexConverter

public class SqlNodeToRexConverterImpl
extends Object
implements SqlNodeToRexConverter

Standard implementation of SqlNodeToRexConverter.

Since:
2005/8/4
Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql2rel/SqlNodeToRexConverterImpl.java#11 $
Author:
jhyde

Field Summary
private  SqlRexConvertletTable convertletTable
           
 
Constructor Summary
SqlNodeToRexConverterImpl(SqlRexConvertletTable convertletTable)
           
 
Method Summary
 RexNode convertCall(SqlRexContext cx, SqlCall call)
          Converts a SqlCall to a RexNode expression.
 RexLiteral convertInterval(SqlRexContext cx, SqlIntervalQualifier intervalQualifier)
          Converts a SQL Interval Qualifier to a REX literal.
 RexNode convertLiteral(SqlRexContext cx, SqlLiteral literal)
          Converts a SQL literal to a REX literal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Converts a SqlCall to a RexNode expression.

Specified by:
convertCall in interface SqlNodeToRexConverter

convertInterval

public RexLiteral convertInterval(SqlRexContext cx,
                                  SqlIntervalQualifier intervalQualifier)
Description copied from interface: SqlNodeToRexConverter
Converts a SQL Interval Qualifier to a REX literal.

Specified by:
convertInterval in interface SqlNodeToRexConverter

convertLiteral

public RexNode convertLiteral(SqlRexContext cx,
                              SqlLiteral literal)
Description copied from interface: SqlNodeToRexConverter
Converts a SQL literal to a REX literal.

The result is RexNode, not RexLiteral because if the literal is NULL (or the boolean Unknown value), we make a CAST(NULL AS type) expression.

Specified by:
convertLiteral in interface SqlNodeToRexConverter