[SPARK-4270][SQL] Fix Cast from DateType to DecimalType.

`Cast` from `DateType` to `DecimalType` throws `NullPointerException`.