I think it is neither.

  • replaceWhere can take expressions, because I've tried using concat without to_date and it doesn't fail.
  • The expression isn't faulty, because it works with the spark conf setting to fallback to old behaviour and also the same expression works in filter, withColumn.