Package org.apache.calcite.rex
Class RexExecutorTest
- java.lang.Object
-
- org.apache.calcite.rex.RexExecutorTest
-
public class RexExecutorTest extends java.lang.Object
Unit test forRexExecutorImpl
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
RexExecutorTest.Action
static class
RexExecutorTest.TestDataContext
ArrayList-based DataContext to check Rex execution.
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.calcite.sql.SqlBinaryOperator
PLUS_RANDOM
-
Constructor Summary
Constructors Constructor Description RexExecutorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
check(RexExecutorTest.Action action)
private void
checkConstant(java.lang.Object operand, java.util.function.Function<org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode> function)
void
testBinarySubstring()
void
testConstant()
void
testConstant2()
Reduces several expressions to constants.void
testDeterministic1()
void
testDeterministic2()
void
testDeterministic3()
void
testSelfPopulatingList()
Test case for [CALCITE-1009] SelfPopulatingList is not thread-safe.void
testSelfPopulatingList30()
void
testSubstring()
void
testVariableExecution()
Tests an executor that uses variables stored in aDataContext
.
-
-
-
Method Detail
-
check
protected void check(RexExecutorTest.Action action) throws java.lang.Exception
- Throws:
java.lang.Exception
-
testVariableExecution
public void testVariableExecution() throws java.lang.Exception
Tests an executor that uses variables stored in aDataContext
. Can change the value of the variable and execute again.- Throws:
java.lang.Exception
-
testConstant
public void testConstant() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testConstant2
public void testConstant2() throws java.lang.Exception
Reduces several expressions to constants.- Throws:
java.lang.Exception
-
checkConstant
private void checkConstant(java.lang.Object operand, java.util.function.Function<org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode> function) throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSubstring
public void testSubstring() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testBinarySubstring
public void testBinarySubstring() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testDeterministic1
public void testDeterministic1() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testDeterministic2
public void testDeterministic2() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testDeterministic3
public void testDeterministic3() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testSelfPopulatingList
public void testSelfPopulatingList()
Test case for [CALCITE-1009] SelfPopulatingList is not thread-safe.
-
testSelfPopulatingList30
public void testSelfPopulatingList30()
-
-