Skip to content

TableFunctionRegistry

TableFunctionRegistry is an extension of the FunctionRegistryBase abstraction for function registries that manage table-valued functions (table functions) that produce a LogicalPlan.

Implementations

Built-In Table-Valued Functions

Name Logical Operator Generator Expression
range Range
explode Explode
explode_outer Explode
inline Inline
inline_outer Inline
json_tuple JsonTuple
posexplode PosExplode
posexplode_outer PosExplode
stack Stack

SimpleTableFunctionRegistry

builtin: SimpleTableFunctionRegistry

TableFunctionRegistry creates a system-wide SimpleTableFunctionRegistry and registers all the built-in table-valued functions.

import org.apache.spark.sql.catalyst.analysis.TableFunctionRegistry
import org.apache.spark.sql.catalyst.analysis.SimpleTableFunctionRegistry
assert(TableFunctionRegistry.builtin.isInstanceOf[SimpleTableFunctionRegistry])
import org.apache.spark.sql.catalyst.analysis.TableFunctionRegistry
TableFunctionRegistry.builtin.listFunction

builtin is used when:

Accessing TableFunctionRegistry

TableFunctionRegistry is available using BaseSessionStateBuilder.tableFunctionRegistry.

SessionCatalog

TableFunctionRegistry is used to create the following: