Record Class TableDependency
- 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
The dependent table is identified by its structural multi-part name. nameParts
arity matches the catalog's namespace depth plus one for the table name -- for a catalog
with single-level namespaces the parts are [catalog, schema, table]; for a catalog
with multi-level namespaces (e.g. Iceberg with db1.db2) the parts are
[catalog, db1, db2, ..., table]; for v1 sources resolved through the session
catalog, producers should normalize to [spark_catalog, db, table] so consumers see
a stable arity per source kind. The structural form preserves arity and is unambiguous
against quoted identifiers containing a literal .; consumers that need a flat
string should join the parts themselves with a quoting scheme appropriate to their wire
format.
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
ConstructorsConstructorDescriptionTableDependency(String[] nameParts) Creates an instance of aTableDependencyrecord class. -
Method Summary
-
Constructor Details
-
TableDependency
Creates an instance of aTableDependencyrecord class.- Parameters:
nameParts- the value for thenamePartsrecord component
-
-
Method Details
-
nameParts
Returns a defensive copy of the underlying parts array. -
equals
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 withObjects::equals(Object,Object). -
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. -
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.
-