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

Leaving a comment here would be good. It's really unintuitive here to see a timestamp can be casted to a boolean while a date has to be null.