Class RexExecutorTest


  • public class RexExecutorTest
    extends java.lang.Object
    Unit test for RexExecutorImpl.
    • Field Detail

      • PLUS_RANDOM

        private static final org.apache.calcite.sql.SqlBinaryOperator PLUS_RANDOM
    • Constructor Detail

      • RexExecutorTest

        public RexExecutorTest()
    • 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 a DataContext. 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
      • testUserFromContext

        public void testUserFromContext()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSystemUserFromContext

        public void testSystemUserFromContext()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testTimestampFromContext

        public void testTimestampFromContext()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testContextLiteral

        private void testContextLiteral​(org.apache.calcite.sql.SqlOperator operator,
                                        org.apache.calcite.DataContext.Variable variable,
                                        java.lang.Object value)
        Ensures that for a given context operator, the correct value is retrieved from the DataContext.
        Parameters:
        operator - The Operator to check
        variable - The DataContext variable this operator should be bound to
        value - The expected value to retrieve.
      • 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
      • testSelfPopulatingList30

        public void testSelfPopulatingList30()