the date validation is pure computation with no database access. These attributes let the optimizer cache results and potentially parallelize execution. For a UDF that is called millions of times in a batch with many duplicate date values, the caching of DETERMINISTIC results can reduce invocations