Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/17626
After I rethinking about it, it really depends on how we define
`deterministic`.
I checked the definition of Hive `UDFType`.
```
/**
* 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.
*
* @return true if the UDF is deterministic
*/
boolean deterministic() default true;
```
The deterministic value of an expression should always consider the
children's deterministic values. All the other existing UDFs in Spark are not
correct. Thus, I will close it and fix them in a separate PR.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]