I have some date in format java.sql.Date and I want to compare them
import java.sql.Date
import org.apache.spark.sql.types.{DateType, IntegerType}
var a = Date.valueOf("2018-11-09")
var b = Date.valueOf("2019-11-09")
a: java.sql.Date = 2018-11-09
b: java.sql.Date = 2019-11-09
If I compare with an equal sign it work
a == b
res1: Boolean = false
But if I want to know which one is bigger than the other it return an error:
a >= b
<console>:37: error: value > is not a member of java.sql.Date
I would expect it to return false.
How can I compare a and b.?