[SPARK-3407][SQL]Add Date type support

The native `compareTo` of both `java.sql.Date` point to `java.util.Date`, which compares the millis since epoch, but `DateWritable` compares days since epoch, so here is the gap.