I use Apache Spark 1.6.2 in Java.
I have a DataFrame containing:
- a date in a creation_date field,
- an end date in a close_date field.
If the business is not closed, then the value in close_date is null.
I would like to:
- add an extra column to my DataFrame called last_date_business
- fill it with the value of close_date
- if close_date is null, then use current_date()
Can I ask Spark to do it or should I do it manually?