DeleteCommand¶
DeleteCommand
is a Delta command that represents DeltaDelete logical command at execution.
DeleteCommand
is a RunnableCommand
logical operator (Spark SQL).
Creating Instance¶
DeleteCommand
takes the following to be created:
- TahoeFileIndex
- Target Data (LogicalPlan)
- Condition (Expression)
DeleteCommand
is created (also using apply factory utility) when:
- PreprocessTableDelete logical resolution rule is executed (and resolves a DeltaDelete logical command)
Performance Metrics¶
Name | web UI |
---|---|
numRemovedFiles | number of files removed. |
numAddedFiles | number of files added. |
numDeletedRows | number of rows deleted. |
Executing Command¶
run(
sparkSession: SparkSession): Seq[Row]
run
is part of the RunnableCommand
(Spark SQL) abstraction.
run
requests the TahoeFileIndex for the DeltaLog (and asserts that the table is removable).
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
(Spark SQL) to recache the target.
performDelete¶
performDelete(
sparkSession: SparkSession,
deltaLog: DeltaLog,
txn: OptimisticTransaction): Unit
performDelete
...FIXME
Creating DeleteCommand¶
apply(
delete: DeltaDelete): DeleteCommand
apply
creates a DeleteCommand.
Last update: 2021-03-31