com.lucidera.query
Class LucidDbSpecialOperators

java.lang.Object
  extended by com.lucidera.query.LucidDbSpecialOperators

public class LucidDbSpecialOperators
extends Object

LucidDbSpecialOperators maintains information about builtin operators that require special handling, e.g., LCS_RID

Version:
$Id: //open/dev/farrago/src/com/lucidera/query/LucidDbSpecialOperators.java#9 $
Author:
Zelaine Fong

Nested Class Summary
private  class LucidDbSpecialOperators.SpecialOperatorInfo
           
 
Field Summary
private  Map<Integer,LucidDbSpecialOperators.SpecialOperatorInfo> colIdMap
          Maps the special column id representing a special operator to the object containing information about the operator
private static int LcsRidColumnId
          Special column id values.
private  Set<SqlOperator> specialOperators
          List of the special operators
private  Map<SqlOperator,LucidDbSpecialOperators.SpecialOperatorInfo> sqlOpMap
          Maps the special operator to an object containing information about the operator
 
Constructor Summary
LucidDbSpecialOperators()
           
 
Method Summary
 Integer getSpecialOpColumnId(SqlOperator op)
           
 Set<SqlOperator> getSpecialOperators()
           
 String getSpecialOpName(int colId)
           
 String getSpecialOpName(SqlOperator op)
           
 SqlTypeName getSpecialOpRetTypeName(int colId)
           
static boolean isLcsRidColumnId(int colId)
           
 Boolean isNullable(int colId)
           
 boolean isSpecialColumnId(int colId)
           
 boolean isSpecialOperator(SqlOperator op)
           
static RexNode makeRidExpr(RexBuilder rexBuilder, RelNode rel)
           
static RexNode makeRidExpr(RexBuilder rexBuilder, RelNode rel, int fieldNo)
          Creates an expression corresponding to an lcs rid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LcsRidColumnId

private static final int LcsRidColumnId
Special column id values. Additional values should be appended here with sequential id values.

See Also:
Constant Field Values

specialOperators

private Set<SqlOperator> specialOperators
List of the special operators


sqlOpMap

private Map<SqlOperator,LucidDbSpecialOperators.SpecialOperatorInfo> sqlOpMap
Maps the special operator to an object containing information about the operator


colIdMap

private Map<Integer,LucidDbSpecialOperators.SpecialOperatorInfo> colIdMap
Maps the special column id representing a special operator to the object containing information about the operator

Constructor Detail

LucidDbSpecialOperators

public LucidDbSpecialOperators()
Method Detail

getSpecialOperators

public Set<SqlOperator> getSpecialOperators()

isSpecialOperator

public boolean isSpecialOperator(SqlOperator op)

isSpecialColumnId

public boolean isSpecialColumnId(int colId)

getSpecialOpName

public String getSpecialOpName(SqlOperator op)

getSpecialOpName

public String getSpecialOpName(int colId)

getSpecialOpRetTypeName

public SqlTypeName getSpecialOpRetTypeName(int colId)

getSpecialOpColumnId

public Integer getSpecialOpColumnId(SqlOperator op)

isNullable

public Boolean isNullable(int colId)

isLcsRidColumnId

public static boolean isLcsRidColumnId(int colId)

makeRidExpr

public static RexNode makeRidExpr(RexBuilder rexBuilder,
                                  RelNode rel,
                                  int fieldNo)
Creates an expression corresponding to an lcs rid

Parameters:
rexBuilder - rex builder used to create the expression
rel - the relnode that the rid expression corresponds to
fieldNo - field in the relnode to use as the argument to the rid expression
Returns:
the rid expression

makeRidExpr

public static RexNode makeRidExpr(RexBuilder rexBuilder,
                                  RelNode rel)