org.eigenbase.oj.util
Class JavaRexBuilder
java.lang.Object
org.eigenbase.rex.RexBuilder
org.eigenbase.oj.util.JavaRexBuilder
- Direct Known Subclasses:
- FarragoRexBuilder
public class JavaRexBuilder
- extends RexBuilder
Extends RexBuilder
to builds row-expressions including those
involving Java code.
- Since:
- Nov 23, 2003
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/oj/util/JavaRexBuilder.java#12 $
- Author:
- jhyde
- See Also:
JavaRowExpression
Methods inherited from class org.eigenbase.rex.RexBuilder |
addAggCall, constantNull, copy, deriveReturnType, getOpTab, getTypeFactory, makeAbstractCast, makeApproxLiteral, makeApproxLiteral, makeBigintLiteral, makeBinaryLiteral, makeCall, makeCall, makeCall, makeCharLiteral, makeCorrel, makeDateLiteral, makeDynamicParam, makeExactLiteral, makeExactLiteral, makeFieldAccess, makeFlag, makeInputRef, makeIntervalLiteral, makeIntervalLiteral, makeLiteral, makeLiteral, makeLiteral, makeNewInvocation, makeNotNullCast, makeNullLiteral, makeNullLiteral, makeOver, makePreciseStringLiteral, makeRangeReference, makeRangeReference, makeReinterpretCast, makeTimeLiteral, makeTimestampLiteral |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
translator
JavaRexBuilder.OJTranslator translator
JavaRexBuilder
public JavaRexBuilder(RelDataTypeFactory typeFactory)
makeFieldAccess
public RexNode makeFieldAccess(RexNode exp,
String fieldName)
- Description copied from class:
RexBuilder
- Creates an expression accessing a given named field from a record.
- Overrides:
makeFieldAccess
in class RexBuilder
- Parameters:
exp
- Expression yielding a recordfieldName
- Name of field in record
- Returns:
- Expression accessing a given named field
createMethodCall
public RexNode createMethodCall(Environment env,
RexNode exp,
String methodName,
List<RexNode> args)
- Creates a call to a Java method.
- Parameters:
exp
- Target of the methodmethodName
- Name of the methodargs
- Argument expressions; null means no arguments
- Returns:
- Method call
makeJava
public RexNode makeJava(Environment env,
Expression expr)
makeCase
public RexNode makeCase(RexNode rexCond,
RexNode rexTrueCase,
RexNode rexFalseCase)
makeCast
public RexNode makeCast(RelDataType type,
RexNode exp)
- Description copied from class:
RexBuilder
- Creates a call to the CAST operator, expanding if possible.
- Overrides:
makeCast
in class RexBuilder
- Parameters:
type
- Type to cast toexp
- Expression being cast
- Returns:
- Call to CAST operator