Skip to content

AppendDelta Scala Extractor

AppendDelta is a Scala extractor for DeltaAnalysis logical resolution rule to analyze AppendData (Spark SQL) logical operators and destructure them into a pair of the following:

Destructuring AppendData

unapply(
  a: AppendData): Option[(DataSourceV2Relation, DeltaTableV2)]

unapply requests the given AppendData (Spark SQL) logical operator for the query. If resolved, unapply requests the AppendData for the table (as a NamedRelation). If the table is a DataSourceV2Relation (Spark SQL) that is also a DeltaTableV2, unapply returns the DataSourceV2Relation and the DeltaTableV2.

For all other cases, unapply returns None (and destructures nothing).

unapply is used when: