DeleteCommand

DeleteCommand is a Delta command that FIXME.

DeleteCommand is created (using apply factory utility) and executed when DeltaTable.delete operator is used (indirectly through DeltaTableOperations when requested to execute delete command).

Creating DeleteCommand Instance

DeleteCommand takes the following to be created:

  • TahoeFileIndex

  • Target LogicalPlan

  • Optional Catalyst expression

Creating DeleteCommand Instance — apply Factory Utility

apply(delete: Delete): DeleteCommand

apply…​FIXME

apply is used when…​FIXME

Running Command — run Method

run(sparkSession: SparkSession): Seq[Row]
run is part of the RunnableCommand contract to…​FIXME.

run requests the TahoeFileIndex for the DeltaLog.

run requests the DeltaLog to start a new transaction for performDelete.

In the end, run re-caches all cached plans (incl. this relation itself) by requesting the CacheManager to recache the target LogicalPlan.

performDelete Internal Method

performDelete(
  sparkSession: SparkSession,
  deltaLog: DeltaLog,
  txn: OptimisticTransaction): Unit

performDelete…​FIXME

performDelete is used exclusively when DeleteCommand is requested to run.