Class TableFunctionImpl

    • Method Detail

      • create

        public static TableFunction create​(java.lang.Class<?> clazz)
        Creates a TableFunctionImpl from a class, looking for an "eval" method. Returns null if there is no such method.
      • create

        public static TableFunction create​(java.lang.Class<?> clazz,
                                           java.lang.String methodName)
        Creates a TableFunctionImpl from a class, looking for a method with a given name. Returns null if there is no such method.
      • getRowType

        public RelDataType getRowType​(RelDataTypeFactory typeFactory,
                                      java.util.List<java.lang.Object> arguments)
        Description copied from interface: TableFunction
        Returns the record type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).
        Specified by:
        getRowType in interface TableFunction
        Parameters:
        typeFactory - Type factory
        arguments - arguments of a function call (only literal arguments are passed, nulls for non-literal ones)
        Returns:
        row type of the table
      • getElementType

        public java.lang.reflect.Type getElementType​(java.util.List<java.lang.Object> arguments)
        Description copied from interface: TableFunction
        Returns the row type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).
        Specified by:
        getElementType in interface TableFunction
        Parameters:
        arguments - arguments of a function call (only literal arguments are passed, nulls for non-literal ones)
        Returns:
        element type of the table (e.g. Object[].class)
      • createImplementor

        private static CallImplementor createImplementor​(java.lang.reflect.Method method)
      • apply

        private Table apply​(java.util.List<java.lang.Object> arguments)