Error when running OPTIMIZE on a Delta table with generated columns

jericksoncea
New Contributor III

I am seeing an error when running OPTIMIZE on a Delta table with generated columns:

com.databricks.sql.transaction.tahoe.schema.DeltaInvariantViolationException: CHECK constraint Generated Column (created <=> now()) violated by row with values:

 - created : 1672360020111000

Using a cluster with runtime 11.3 LTS (includes Apache Spark 3.3.0, Scala 2.12)

Any ideas how I can successfully OPTIMIZE this table?