Class AbstractConnectorTableFunction

java.lang.Object
io.trino.spi.function.table.AbstractConnectorTableFunction
All Implemented Interfaces:
ConnectorTableFunction

@Experimental(eta="2022-10-31") public abstract class AbstractConnectorTableFunction extends Object implements ConnectorTableFunction
  • Constructor Details

  • Method Details

    • getSchema

      public String getSchema()
      Specified by:
      getSchema in interface ConnectorTableFunction
    • getName

      public String getName()
      Specified by:
      getName in interface ConnectorTableFunction
    • getArguments

      public List<ArgumentSpecification> getArguments()
      Specified by:
      getArguments in interface ConnectorTableFunction
    • getReturnTypeSpecification

      public ReturnTypeSpecification getReturnTypeSpecification()
      Specified by:
      getReturnTypeSpecification in interface ConnectorTableFunction
    • analyze

      public abstract TableFunctionAnalysis analyze(ConnectorSession session, ConnectorTransactionHandle transaction, Map<String,Argument> arguments, ConnectorAccessControl accessControl)
      Description copied from interface: ConnectorTableFunction
      This method is called by the Analyzer. Its main purposes are to: 1. Determine the resulting relation type of the Table Function in case when the declared return type is GENERIC_TABLE. 2. Declare the required columns from the input tables. 3. Perform function-specific validation and pre-processing of the input arguments. As part of function-specific validation, the Table Function's author might want to: - check if the descriptors which reference input tables contain a correct number of column references - check if the referenced input columns have appropriate types to fit the function's logic // TODO return request for coercions to the Analyzer in the TableFunctionAnalysis object - if there is a descriptor which describes the function's output, check if it matches the shape of the actual function's output - for table arguments, check the number and types of ordering columns

      The actual argument values, and the pre-processing results can be stored in an ConnectorTableFunctionHandle object, which will be passed along with the Table Function invocation through subsequent phases of planning.

      Specified by:
      analyze in interface ConnectorTableFunction
      arguments - actual invocation arguments, mapped by argument names