[SPARK-4375] [SQL] Add 0 argument support for udf