Hubert-Dudek
Databricks MVP

Can you try to generate that column earlier:

.withColumn("conditionColumn", to_date...

to simplify code so replaceWhere will be easier to debug as now it is complaining about to_date


My blog: https://databrickster.medium.com/