Like Hive UDFType, we should allow users to add the extra flags for ScalaUDF too. stateful/impliesOrder are not applicable to ScalaUDF. Thus, we only add the following two flags.
- deterministic: Certain optimizations should not be applied if UDF is not deterministic. Deterministic UDF returns same result each time it is invoked with a particular input. This determinism just needs to hold within the context of a query.