org.eigenbase.test
Class RexTransformerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.RexTransformerTest
All Implemented Interfaces:
Test

public class RexTransformerTest
extends TestCase

Tests transformations on rex nodes.

Since:
Mar 9, 2004
Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/RexTransformerTest.java#16 $
Author:
wael

Field Summary
(package private)  RelDataType boolRelDataType
           
(package private)  RexNode falseRex
           
(package private)  RexBuilder rexBuilder
           
(package private)  RexNode trueRex
           
(package private)  RelDataTypeFactory typeFactory
           
(package private)  RexNode x
           
(package private)  RexNode y
           
(package private)  RexNode z
           
 
Constructor Summary
RexTransformerTest()
           
 
Method Summary
(package private)  void check(Boolean encapsulateType, RexNode node, String expected)
           
protected  void setUp()
           
 void testMixed1()
           
 void testMixed2()
           
 void testMixed3()
           
 void testNonBooleans()
           
 void testOptimizeNonNullLiterals()
           
 void testOrUnchanged()
          the or operator should pass through unchanged since e.g.
 void testPreTests()
           
 void testSimpleAnd()
           
 void testSimpleEquals()
           
 void testSimpleGreaterEquals()
           
 void testSimpleGreaterThan()
           
 void testSimpleIdentifier()
           
 void testSimpleLessEqual()
           
 void testSimpleLessThan()
           
 void testSimpleNotEquals()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rexBuilder

RexBuilder rexBuilder

x

RexNode x

y

RexNode y

z

RexNode z

trueRex

RexNode trueRex

falseRex

RexNode falseRex

boolRelDataType

RelDataType boolRelDataType

typeFactory

RelDataTypeFactory typeFactory
Constructor Detail

RexTransformerTest

public RexTransformerTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class TestCase
Throws:
Exception

check

void check(Boolean encapsulateType,
           RexNode node,
           String expected)

testPreTests

public void testPreTests()

testNonBooleans

public void testNonBooleans()

testOrUnchanged

public void testOrUnchanged()
the or operator should pass through unchanged since e.g. x OR y should return true if x=null and y=true if it was transformed into something like (x ISNOTNULL) AND (y ISNOTNULL) AND (x OR y) an incorrect result could be produced


testSimpleAnd

public void testSimpleAnd()

testSimpleEquals

public void testSimpleEquals()

testSimpleNotEquals

public void testSimpleNotEquals()

testSimpleGreaterThan

public void testSimpleGreaterThan()

testSimpleGreaterEquals

public void testSimpleGreaterEquals()

testSimpleLessThan

public void testSimpleLessThan()

testSimpleLessEqual

public void testSimpleLessEqual()

testOptimizeNonNullLiterals

public void testOptimizeNonNullLiterals()

testSimpleIdentifier

public void testSimpleIdentifier()

testMixed1

public void testMixed1()

testMixed2

public void testMixed2()

testMixed3

public void testMixed3()