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

If `Datetype` can not be casted into `IntegerType` / `ShortType` / `LongType`, let's remove this, raise exception in `compile` time probably better than in `runtime`.