org.eigenbase.rel.rules
Class SwapJoinRule.VariableReplacer

java.lang.Object
  extended by org.eigenbase.rel.rules.SwapJoinRule.VariableReplacer
Enclosing class:
SwapJoinRule

private static class SwapJoinRule.VariableReplacer
extends Object

Walks over an expression, replacing references to fields of the left and right inputs.

If the field index is less than leftFieldCount, it must be from the left, and so has rightFieldCount added to it; if the field index is greater than leftFieldCount, it must be from the right, so we subtract leftFieldCount from it.


Field Summary
private  RelDataTypeField[] leftFields
           
private  RexBuilder rexBuilder
           
private  RelDataTypeField[] rightFields
           
 
Constructor Summary
SwapJoinRule.VariableReplacer(RexBuilder rexBuilder, RelDataType leftType, RelDataType rightType)
           
 
Method Summary
 RexNode go(RexNode rex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rexBuilder

private final RexBuilder rexBuilder

leftFields

private final RelDataTypeField[] leftFields

rightFields

private final RelDataTypeField[] rightFields
Constructor Detail

SwapJoinRule.VariableReplacer

SwapJoinRule.VariableReplacer(RexBuilder rexBuilder,
                              RelDataType leftType,
                              RelDataType rightType)
Method Detail

go

public RexNode go(RexNode rex)