Record Class FunctionDependency

Object
Record
org.apache.spark.sql.connector.catalog.FunctionDependency
Record Components:
nameParts - structural multi-part identifier; must be non-empty and contain no null elements (defensive copy made; not validated element-wise -- callers passing nulls will surface NPEs in downstream consumers)
All Implemented Interfaces:
Dependency

@Evolving public record FunctionDependency(String[] nameParts) extends Record implements Dependency
A function dependency of a SQL object.

The dependent function is identified by its structural multi-part name. See TableDependency for the parts-form contract.

Records' auto-generated equals/hashCode on array fields fall through to Object.equals(java.lang.Object) (reference equality), so this record overrides them to use Arrays.equals(Object[], Object[]) / Arrays.hashCode(Object[]) on nameParts and give value-based semantics. The defensive-copy accessor override also clones on read so callers cannot mutate the record's internal array.

Since:
4.2.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a FunctionDependency record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    Returns a defensive copy of the underlying parts array.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FunctionDependency

      public FunctionDependency(String[] nameParts)
      Creates an instance of a FunctionDependency record class.
      Parameters:
      nameParts - the value for the nameParts record component
  • Method Details

    • nameParts

      public String[] nameParts()
      Returns a defensive copy of the underlying parts array.
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object