org.eigenbase.oj.util
Class JavaRowExpression

java.lang.Object
  extended by org.eigenbase.rex.RexNode
      extended by org.eigenbase.oj.util.JavaRowExpression

public class JavaRowExpression
extends RexNode

A row expression which is implemented by an underlying Java expression.

This is a leaf node of a RexNode tree, but the Java expression, represented by a Expression object, may be complex.

Since:
Nov 23, 2003
Version:
$Id: //open/dev/farrago/src/org/eigenbase/oj/util/JavaRowExpression.java#14 $
Author:
jhyde
See Also:
JavaRexBuilder

Field Summary
(package private)  Environment env
           
private  Expression expression
           
private  RelDataType type
           
 
Fields inherited from class org.eigenbase.rex.RexNode
digest, EMPTY_ARRAY
 
Constructor Summary
JavaRowExpression(Environment env, RelDataType type, Expression expression)
           
 
Method Summary
<R> R
accept(RexVisitor<R> visitor)
          Accepts a visitor, dispatching to the right overloaded visitXxx method.
 JavaRowExpression clone()
           
 Expression getExpression()
           
 RelDataType getType()
           
 boolean isAlwaysTrue()
          Returns whether this expression always returns true.
 
Methods inherited from class org.eigenbase.rex.RexNode
getKind, isA, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

env

final Environment env

type

private final RelDataType type

expression

private final Expression expression
Constructor Detail

JavaRowExpression

public JavaRowExpression(Environment env,
                         RelDataType type,
                         Expression expression)
Method Detail

isAlwaysTrue

public boolean isAlwaysTrue()
Description copied from class: RexNode
Returns whether this expression always returns true. (Such as if this expression is equal to the literal TRUE.)

Overrides:
isAlwaysTrue in class RexNode

accept

public <R> R accept(RexVisitor<R> visitor)
Description copied from class: RexNode
Accepts a visitor, dispatching to the right overloaded visitXxx method.

Also see RexProgram.apply(RexVisitor, RexNode[], RexNode), which applies a visitor to several expressions simultaneously.

Specified by:
accept in class RexNode

getType

public RelDataType getType()
Specified by:
getType in class RexNode

getExpression

public Expression getExpression()

clone

public JavaRowExpression clone()
Specified by:
clone in class RexNode