delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.63k stars 1.71k forks source link

[BUG][Spark] DeltaTable.vacuum() does not return metrics as DataFrame #3689

Open stevenayers-bge opened 2 months ago

stevenayers-bge commented 2 months ago

Bug

Which Delta project/connector is this regarding?

Describe the problem

Operations such as optimize return a DataFrame with the operation's metrics; however, vacuum() returns an empty DataFrame.

Steps to reproduce

from delta import DeltaTable
from pyspark.sql import SparkSession

spark = SparkSession.builder.getOrCreate()
my_table = DeltaTable.forName(spark, "my_schema.my_table")
df = my_table.vacuum()
assert df.isEmpty()

Environment information

Willingness to contribute

The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?