Interface TableFunction

All Superinterfaces:
Function
All Known Implementing Classes:
SqlAdvisorGetHintsFunction, SqlAdvisorGetHintsFunction2, TableFunctionImpl

public interface TableFunction extends Function
Function that returns a table during execution time.

In contrast with TableMacro, the result of the table is not known until execution.

  • Method Summary

    Modifier and Type
    Method
    Description
    getElementType(List<? extends @Nullable Object> arguments)
    Returns the row type of the table yielded by this function when applied to given arguments.
    getRowType(RelDataTypeFactory typeFactory, List<? extends @Nullable Object> arguments)
    Returns the record type of the table yielded by this function when applied to given arguments.

    Methods inherited from interface org.apache.calcite.schema.Function

    getParameters
  • Method Details

    • getRowType

      RelDataType getRowType(RelDataTypeFactory typeFactory, List<? extends @Nullable Object> arguments)
      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).
      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

      Type getElementType(List<? extends @Nullable Object> arguments)
      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).
      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)