org.eigenbase.relopt
Class RelOptUtil.RexInputConverter

java.lang.Object
  extended by org.eigenbase.rex.RexShuttle
      extended by org.eigenbase.relopt.RelOptUtil.RexInputConverter
All Implemented Interfaces:
RexVisitor<RexNode>
Direct Known Subclasses:
PushProjector.RefAndExprConverter
Enclosing class:
RelOptUtil

public static class RelOptUtil.RexInputConverter
extends RexShuttle

Walks an expression tree, converting the index of RexInputRefs based on some adjustment factor.


Field Summary
private  int[] adjustments
           
protected  RelDataTypeField[] destFields
           
private  RelDataTypeField[] leftDestFields
           
private  int nLeftDestFields
           
protected  RexBuilder rexBuilder
           
private  RelDataTypeField[] rightDestFields
           
private  RelDataTypeField[] srcFields
           
 
Constructor Summary
  RelOptUtil.RexInputConverter(RexBuilder rexBuilder, RelDataTypeField[] srcFields, int[] adjustments)
           
  RelOptUtil.RexInputConverter(RexBuilder rexBuilder, RelDataTypeField[] srcFields, RelDataTypeField[] destFields, int[] adjustments)
           
  RelOptUtil.RexInputConverter(RexBuilder rexBuilder, RelDataTypeField[] srcFields, RelDataTypeField[] leftDestFields, RelDataTypeField[] rightDestFields, int[] adjustments)
           
private RelOptUtil.RexInputConverter(RexBuilder rexBuilder, RelDataTypeField[] srcFields, RelDataTypeField[] destFields, RelDataTypeField[] leftDestFields, RelDataTypeField[] rightDestFields, int[] adjustments)
           
 
Method Summary
 RexNode visitInputRef(RexInputRef var)
           
 
Methods inherited from class org.eigenbase.rex.RexShuttle
apply, apply, visitArray, visitCall, visitCorrelVariable, visitDynamicParam, visitFieldAccess, visitLiteral, visitLocalRef, visitOver, visitRangeRef, visitWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rexBuilder

protected final RexBuilder rexBuilder

srcFields

private final RelDataTypeField[] srcFields

destFields

protected final RelDataTypeField[] destFields

leftDestFields

private final RelDataTypeField[] leftDestFields

rightDestFields

private final RelDataTypeField[] rightDestFields

nLeftDestFields

private final int nLeftDestFields

adjustments

private final int[] adjustments
Constructor Detail

RelOptUtil.RexInputConverter

private RelOptUtil.RexInputConverter(RexBuilder rexBuilder,
                                     RelDataTypeField[] srcFields,
                                     RelDataTypeField[] destFields,
                                     RelDataTypeField[] leftDestFields,
                                     RelDataTypeField[] rightDestFields,
                                     int[] adjustments)
Parameters:
rexBuilder - builder for creating new RexInputRefs
srcFields - fields where the RexInputRefs originally originated from; if null, a new RexInputRef is always created, referencing the input from destFields corresponding to its current index value
destFields - fields that the new RexInputRefs will be referencing; if null, use the type information from the source field when creating the new RexInputRef
leftDestFields - in the case where the destination is a join, these are the fields from the left join input
rightDestFields - in the case where the destination is a join, these are the fields from the right join input
adjustments - the amount to adjust each field by

RelOptUtil.RexInputConverter

public RelOptUtil.RexInputConverter(RexBuilder rexBuilder,
                                    RelDataTypeField[] srcFields,
                                    RelDataTypeField[] leftDestFields,
                                    RelDataTypeField[] rightDestFields,
                                    int[] adjustments)

RelOptUtil.RexInputConverter

public RelOptUtil.RexInputConverter(RexBuilder rexBuilder,
                                    RelDataTypeField[] srcFields,
                                    RelDataTypeField[] destFields,
                                    int[] adjustments)

RelOptUtil.RexInputConverter

public RelOptUtil.RexInputConverter(RexBuilder rexBuilder,
                                    RelDataTypeField[] srcFields,
                                    int[] adjustments)
Method Detail

visitInputRef

public RexNode visitInputRef(RexInputRef var)
Specified by:
visitInputRef in interface RexVisitor<RexNode>
Overrides:
visitInputRef in class RexShuttle