DeltaTableValueFunctions¶
supportedFnNames¶
DeltaTableValueFunctions defines the following table-valued functions:
- table_changes (table changes by name)
- table_changes_by_path
getTableValueFunctionInjection¶
type TableFunctionDescription =
(FunctionIdentifier, ExpressionInfo, TableFunctionRegistry.TableFunctionBuilder)
getTableValueFunctionInjection(
fnName: String): TableFunctionDescription
getTableValueFunctionInjection...FIXME
getTableValueFunctionInjection is used when:
- DeltaSparkSessionExtension is requested to register extensions (incl. table-valued functions)
resolveChangesTableValueFunctions¶
resolveChangesTableValueFunctions(
session: SparkSession,
fnName: String,
args: Seq[Expression]): LogicalPlan
resolveChangesTableValueFunctions extracts the following values of the CDF options (from the given args expressions):
startingVersionorstartingTimestampendingVersionorendingTimestamp
resolveChangesTableValueFunctions defines the following option:
| Option | Value |
|---|---|
| readChangeFeed | true |
For table_changes, resolveChangesTableValueFunctions requests the SessionCatalog (Spark SQL) for the table metadata.
resolveChangesTableValueFunctions creates a DeltaTableV2 for the table path (from the SessionCatalog or given explicitly for table_changes_by_path) and the CDF options.
resolveChangesTableValueFunctions requests the DeltaTableV2 for a BaseRelation to create a LogicalRelation (Spark SQL).
Non-Streaming LogicalRelation
resolveChangesTableValueFunctions creates a non-streaming LogicalRelation.
resolveChangesTableValueFunctions is used when:
- DeltaAnalysis logical resolution rule is executed (to resolve DeltaTableValueFunction logical operators)