Package org.apache.calcite.schema
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.reflect.Type
getElementType(java.util.List<java.lang.Object> arguments)
Returns the row type of the table yielded by this function when applied to given arguments.RelDataType
getRowType(RelDataTypeFactory typeFactory, java.util.List<java.lang.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 Detail
-
getRowType
RelDataType getRowType(RelDataTypeFactory typeFactory, java.util.List<java.lang.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 factoryarguments
- arguments of a function call (only literal arguments are passed, nulls for non-literal ones)- Returns:
- row type of the table
-
getElementType
java.lang.reflect.Type getElementType(java.util.List<java.lang.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
)
-
-