deltalake_core::operations

Module optimize

Source
Expand description

Optimize a Delta Table

Perform bin-packing on a Delta Table which merges small files into a large file. Bin-packing reduces the number of API calls required for read operations.

Optimize will fail if a concurrent write operation removes files from the table (such as in an overwrite). It will always succeed if concurrent writers are only appending.

Optimize increments the table’s version and creates remove actions for optimized files. Optimize does not delete files from storage. To delete files that were removed, call vacuum on DeltaTable.

See OptimizeBuilder for configuration.

§Example

let table = open_table("../path/to/table")?;
let (table, metrics) = OptimizeBuilder::new(table.object_store(), table.state).await?;

Structs§

Enums§

Functions§