[BUG] SparkSession settings for autoCompact and optimizeWrite do not take effect #3967
Open
2 of 8 tasks
Labels
bug
Something isn't working
Bug
Which Delta project/connector is this regarding?
Describe the problem
When creating a delta table using spark 3.5.3 and delta 3.2.1, the spark session setting mentioned in https://docs.delta.io/latest/optimizations-oss.html#auto-compaction for enabling auto compaction and optimized write doesn't take effect.
More specifically, the properties tried here
spark.databricks.delta.autoCompact.enabled
andspark.databricks.delta.optimizeWrite.enabled
do not take effect.Other properties were not tried/tested.
However, using
spark.databricks.delta.properties.defaults.autoOptimize.autoCompact
andspark.databricks.delta.properties.defaults.autoOptimize.optimizeWrite
properties work.just curious, should these properties be exposed with
spark.delta
prefix instead ofspark.databricks.delta
?Steps to reproduce
jars
folder.Observed results
spark.databricks.delta.autoCompact.enabled=true
andspark.databricks.delta.optimizeWrite.enabled=true
when invoking pyspark shell./bin/pyspark --verbose --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog" --conf spark.databricks.delta.autoCompact.enabled="true" --conf spark.databricks.delta.autoCompact.minNumFiles="10" --conf spark.databricks.delta.optimizeWrite.enabled="true"
spark.databricks.delta.properties.defaults.autoOptimize.autoCompact=true
andspark.databricks.delta.properties.defaults.autoOptimize.optimizeWrite=true
when invoking pyspark shell./bin/pyspark --verbose --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog" --conf spark.databricks.delta.properties.defaults.autoOptimize.autoCompact="true" --conf spark.databricks.delta.autoCompact.minNumFiles="10" --conf spark.databricks.delta.properties.defaults.autoOptimize.optimizeWrite="true"
Expected results
As per the documentation https://docs.delta.io/latest/optimizations-oss.html#auto-compaction, using using "spark.databricks.delta.autoCompact.enabled=true" and "spark.databricks.delta.optimizeWrite.enabled=true" should have enabled these properties on the delta table
Further details
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?
The text was updated successfully, but these errors were encountered: