Skip to content


OptimizeTableCommand is a LeafRunnableCommand (Spark SQL).

Creating Instance

OptimizeTableCommand takes the following to be created:

  • Table Path
  • TableIdentifier
  • Optional partition predicate

OptimizeTableCommand is created when:

Executing Command

  sparkSession: SparkSession): Seq[Row]

run gets the DeltaLog of the Delta table (by the path or tableId).

In the end, run creates an OptimizeExecutor that is in turn requested to optimize.

run is part of the RunnableCommand (Spark SQL) abstraction.

Back to top