Interface SqlTableFunction

All Known Implementing Classes:
MockSqlOperatorTable.BadTableFunction, MockSqlOperatorTable.DedupFunction, MockSqlOperatorTable.DynamicTypeFunction, MockSqlOperatorTable.InvalidTableFunction, MockSqlOperatorTable.RampFunction, MockSqlOperatorTable.RowFunction, MockSqlOperatorTable.ScoreTableFunction, MockSqlOperatorTable.SimilarlityTableFunction, MockSqlOperatorTable.TopNTableFunction, SqlHopTableFunction, SqlSessionTableFunction, SqlTumbleTableFunction, SqlUserDefinedTableFunction, SqlUserDefinedTableMacro, SqlWindowTableFunction

public interface SqlTableFunction
A function that returns a table.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the record type of the table yielded by this function when applied to given arguments.
    default @Nullable TableCharacteristic
    tableCharacteristic(int ordinal)
    Returns the table parameter characteristics for ordinalth parameter to this table function.
  • Method Details

    • getRowTypeInference

      SqlReturnTypeInference getRowTypeInference()
      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).
      Returns:
      strategy to infer the row type of a call to this function
    • tableCharacteristic

      default @Nullable TableCharacteristic tableCharacteristic(int ordinal)
      Returns the table parameter characteristics for ordinalth parameter to this table function.

      Returns null if the ordinalth argument is not table parameter or the ordinal is smaller than 0 or the ordinal is greater than or equals to the number of parameters.