Rewrites Parquet files whose rows have mostly been deleted. Deletes in DuckLake are recorded in separate delete files; heavily-deleted data files slow reads down until they are rewritten without the dead rows.
Arguments
- ducklake_name
Name of the attached DuckLake catalog. If
NULL, the current database is used.- table_name
Optional table name. When provided, only that table's files are rewritten.
- delete_threshold
Optional fraction of deleted rows (between 0 and
above which a file is rewritten. DuckLake's default is 0.95.
Value
A data frame with one row per output file (columns
schema_name, table_name, files_processed, files_created).
Details
The rewritten originals are scheduled for deletion once no snapshot
references them; run cleanup_old_files() to remove them.
