Package io.trino.spi.function.table
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 Summary
ConstructorsConstructorDescriptionAbstractConnectorTableFunction(String schema, String name, List<ArgumentSpecification> arguments, ReturnTypeSpecification returnTypeSpecification) -
Method Summary
Modifier and TypeMethodDescriptionabstract TableFunctionAnalysisanalyze(ConnectorSession session, ConnectorTransactionHandle transaction, Map<String, Argument> arguments, ConnectorAccessControl accessControl) This method is called by the Analyzer.getName()
-
Constructor Details
-
AbstractConnectorTableFunction
public AbstractConnectorTableFunction(String schema, String name, List<ArgumentSpecification> arguments, ReturnTypeSpecification returnTypeSpecification)
-
-
Method Details
-
getSchema
- Specified by:
getSchemain interfaceConnectorTableFunction
-
getName
- Specified by:
getNamein interfaceConnectorTableFunction
-
getArguments
- Specified by:
getArgumentsin interfaceConnectorTableFunction
-
getReturnTypeSpecification
- Specified by:
getReturnTypeSpecificationin interfaceConnectorTableFunction
-
analyze
public abstract TableFunctionAnalysis analyze(ConnectorSession session, ConnectorTransactionHandle transaction, Map<String, Argument> arguments, ConnectorAccessControl accessControl) Description copied from interface:ConnectorTableFunctionThis 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 columnsThe 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:
analyzein interfaceConnectorTableFunctionarguments- actual invocation arguments, mapped by argument names
-