Delta Table Optimize Error

Dean_Lovelace
New Contributor III

I have have started getting an error message when running the following optimize command:-

deltaTable.optimize().executeCompaction()

Error:-

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Number of records changed after Optimize. NumRecordsCheckInfo(OPTIMIZE,394,1058,2554337689,2600474509,0,0,Map(predicate -> "[]", zOrderBy -> "[]", batchId -> "0", auto -> false))

What is the cause of this? It has been running fine for months.

This is with runtime 11.3 using pyspark.