org.eigenbase.sql2rel
Class StandardConvertletTable

java.lang.Object
  extended by org.eigenbase.sql2rel.ReflectiveConvertletTable
      extended by org.eigenbase.sql2rel.StandardConvertletTable
All Implemented Interfaces:
SqlRexConvertletTable

public class StandardConvertletTable
extends ReflectiveConvertletTable

Standard implementation of SqlRexConvertletTable.


Constructor Summary
StandardConvertletTable()
           
 
Method Summary
 RexNode castToValidatedType(SqlRexContext cx, SqlCall call, RexNode value)
          Casts a RexNode value to the validated type of a SqlCall.
 RexNode convertAggregateFunction(SqlRexContext cx, SqlAggFunction fun, SqlCall call)
           
 RexNode convertBetween(SqlRexContext cx, SqlBetweenOperator op, SqlCall call)
          Converts a BETWEEN expression.
 RexNode convertCall(SqlRexContext cx, SqlCall call)
          Converts a call to an operator into a RexCall to the same operator.
 RexNode convertCase(SqlRexContext cx, SqlCase call)
          Converts a CASE expression.
protected  RexNode convertCast(SqlRexContext cx, SqlCall call)
           
 RexNode convertDatetimeMinus(SqlRexContext cx, SqlDatetimeSubtractionOperator op, SqlCall call)
           
private  RexNode[] convertExpressionList(SqlRexContext cx, SqlNode[] nodes)
           
 RexNode convertExtract(SqlRexContext cx, SqlExtractFunction op, SqlCall call)
           
protected  RexNode convertFloorCeil(SqlRexContext cx, SqlCall call, boolean isFloor)
           
 RexNode convertFunction(SqlRexContext cx, SqlFunction fun, SqlCall call)
           
private  RexNode convertIsDistinctFrom(SqlRexContext cx, SqlCall call, boolean neg)
           
 RexNode convertJdbc(SqlRexContext cx, SqlJdbcFunctionCall op, SqlCall call)
           
 RexNode convertLiteralChain(SqlRexContext cx, SqlLiteralChainOperator op, SqlCall call)
          Converts a LiteralChain expression: that is, concatenates the operands immediately, to produce a single literal string.
 RexNode convertMultiset(SqlRexContext cx, SqlMultisetValueConstructor op, SqlCall call)
           
 RexNode convertMultisetQuery(SqlRexContext cx, SqlMultisetQueryConstructor op, SqlCall call)
           
private  SqlNode expandAvg(SqlNode arg, SqlRexContext cx, SqlCall call)
           
private  RexNode makeConstructorCall(SqlRexContext cx, SqlFunction constructor, RexNode[] exprs)
           
 
Methods inherited from class org.eigenbase.sql2rel.ReflectiveConvertletTable
addAlias, get, registerOp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardConvertletTable

public StandardConvertletTable()
Method Detail

expandAvg

private SqlNode expandAvg(SqlNode arg,
                          SqlRexContext cx,
                          SqlCall call)

convertCase

public RexNode convertCase(SqlRexContext cx,
                           SqlCase call)
Converts a CASE expression.


convertMultiset

public RexNode convertMultiset(SqlRexContext cx,
                               SqlMultisetValueConstructor op,
                               SqlCall call)

convertMultisetQuery

public RexNode convertMultisetQuery(SqlRexContext cx,
                                    SqlMultisetQueryConstructor op,
                                    SqlCall call)

convertJdbc

public RexNode convertJdbc(SqlRexContext cx,
                           SqlJdbcFunctionCall op,
                           SqlCall call)

convertCast

protected RexNode convertCast(SqlRexContext cx,
                              SqlCall call)

convertFloorCeil

protected RexNode convertFloorCeil(SqlRexContext cx,
                                   SqlCall call,
                                   boolean isFloor)

convertExtract

public RexNode convertExtract(SqlRexContext cx,
                              SqlExtractFunction op,
                              SqlCall call)

convertDatetimeMinus

public RexNode convertDatetimeMinus(SqlRexContext cx,
                                    SqlDatetimeSubtractionOperator op,
                                    SqlCall call)

convertFunction

public RexNode convertFunction(SqlRexContext cx,
                               SqlFunction fun,
                               SqlCall call)

convertAggregateFunction

public RexNode convertAggregateFunction(SqlRexContext cx,
                                        SqlAggFunction fun,
                                        SqlCall call)

makeConstructorCall

private RexNode makeConstructorCall(SqlRexContext cx,
                                    SqlFunction constructor,
                                    RexNode[] exprs)

convertCall

public RexNode convertCall(SqlRexContext cx,
                           SqlCall call)
Converts a call to an operator into a RexCall to the same operator.

Called automatically via reflection.

Parameters:
cx - Context
call - Call
Returns:
Rex call

convertExpressionList

private RexNode[] convertExpressionList(SqlRexContext cx,
                                        SqlNode[] nodes)

convertIsDistinctFrom

private RexNode convertIsDistinctFrom(SqlRexContext cx,
                                      SqlCall call,
                                      boolean neg)

convertBetween

public RexNode convertBetween(SqlRexContext cx,
                              SqlBetweenOperator op,
                              SqlCall call)
Converts a BETWEEN expression.

Called automatically via reflection.


convertLiteralChain

public RexNode convertLiteralChain(SqlRexContext cx,
                                   SqlLiteralChainOperator op,
                                   SqlCall call)
Converts a LiteralChain expression: that is, concatenates the operands immediately, to produce a single literal string.

Called automatically via reflection.


castToValidatedType

public RexNode castToValidatedType(SqlRexContext cx,
                                   SqlCall call,
                                   RexNode value)
Casts a RexNode value to the validated type of a SqlCall. If the value was already of the validated type, then the value is returned without an additional cast.