Interface Dependency

All Known Implementing Classes:
FunctionDependency, TableDependency

@Evolving public sealed interface Dependency permits TableDependency, FunctionDependency
Represents a dependency of a SQL object such as a view or metric view.

A dependency is one of: TableDependency or FunctionDependency. The sealed declaration enforces this structurally.

Note: today the only producer in Spark itself is metric-view dependency extraction, which emits TableDependency only. FunctionDependency and the function(String[]) factory are exposed as groundwork for future producers (e.g. SQL UDF dependency tracking); consumers iterating a DependencyList received from Spark today should expect to see only TableDependency instances.

Since:
4.2.0
  • Method Details

    • table

      static TableDependency table(String[] nameParts)
      Construct a TableDependency from the structural multi-part name of the dependent table. nameParts should contain at least one element; for catalog-managed tables the first element is typically the catalog name and subsequent elements are namespace components followed by the table name.
    • function

      static FunctionDependency function(String[] nameParts)
      Construct a FunctionDependency from the structural multi-part name of the dependent function. nameParts should contain at least one element; for catalog-managed functions the first element is typically the catalog name and subsequent elements are namespace components followed by the function name.