Class UdfTest


  • public class UdfTest
    extends java.lang.Object
    Tests for user-defined functions; includes user-defined aggregate functions but user-defined table functions are in TableFunctionTest.
    See Also:
    Smalls
    • Constructor Detail

      • UdfTest

        public UdfTest()
    • Method Detail

      • testUserDefinedFunction

        public void testUserDefinedFunction()
                                     throws java.lang.Exception
        Tests a user-defined function that is defined in terms of a class with non-static methods.
        Throws:
        java.lang.Exception
      • testUserDefinedFunctionB

        public void testUserDefinedFunctionB()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserDefinedFunctionWithNull

        public void testUserDefinedFunctionWithNull()
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNotNullImplementor

        public void testNotNullImplementor()
        Tests that IS NULL/IS NOT NULL is properly implemented for non-strict functions.
      • testSemiStrict

        public void testSemiStrict()
        Tests that we generate the appropriate checks for a "semi-strict" function.

        The difference between "strict" and "semi-strict" functions is that a "semi-strict" function might return null even if none of its arguments are null. (Both always return null if one of their arguments is null.) Thus, a nasty function is more unpredictable.

        See Also:
        SemiStrict
      • testUdfDerivedReturnType

        public void testUdfDerivedReturnType()
        Tests derived return type of user-defined function.
      • testUdfOverloaded

        public void testUdfOverloaded()
        Tests a user-defined function that has multiple overloads.
      • testUdfOverloadedNullable

        public void testUdfOverloadedNullable()
      • testUdfArgumentName

        public void testUdfArgumentName()
        Tests passing parameters to user-defined function by name.
      • testUdfArgumentOptional

        public void testUdfArgumentOptional()
        Tests calling a user-defined function some of whose parameters are optional.
      • testUserDefinedFunction2

        public void testUserDefinedFunction2()
                                      throws java.lang.Exception
        Test for CalciteResource.requireDefaultConstructor(String).
        Throws:
        java.lang.Exception
      • testUserDefinedFunctionWithMethodName

        public void testUserDefinedFunctionWithMethodName()
                                                   throws java.lang.Exception
        Tests user-defined function, with multiple methods per class.
        Throws:
        java.lang.Exception
      • testUserDefinedAggregateFunction

        public void testUserDefinedAggregateFunction()
                                              throws java.lang.Exception
        Tests user-defined aggregate function.
        Throws:
        java.lang.Exception
      • testUserDefinedAggregateFunctionWithMultipleParameters

        public void testUserDefinedAggregateFunctionWithMultipleParameters()
                                                                    throws java.lang.Exception
        Tests user-defined aggregate function.
        Throws:
        java.lang.Exception
      • testUserDefinedAggregateFunction3

        public void testUserDefinedAggregateFunction3()
                                               throws java.lang.Exception
        Test for CalciteResource.firstParameterOfAdd(String).
        Throws:
        java.lang.Exception
      • testUserDefinedAggregateFunctionWithFilter

        public void testUserDefinedAggregateFunctionWithFilter()
                                                        throws java.lang.Exception
        Tests user-defined aggregate function with FILTER.

        Also tests that we do not try to push ADAF to JDBC source.

        Throws:
        java.lang.Exception
      • testPath

        public void testPath()
                      throws java.lang.Exception
        Tests resolution of functions using schema paths.
        Throws:
        java.lang.Exception