Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/18906#discussion_r159415581
--- Diff: python/pyspark/sql/udf.py ---
@@ -163,14 +164,25 @@ def wrapper(*args):
wrapper.returnType = self.returnType
wrapper.evalType = self.evalType
wrapper.asNondeterministic = self.asNondeterministic
+ wrapper.asNonNullable = self.asNonNullable
--- End diff --
I had some discussion in `https://github.com/apache/spark/pull/20137`. How
about doing:
```python
wrapper.asNonNullable = functools.wraps(
self.asNonNullable)(lambda: self.asNonNullable()._wrapped())
```
and leaving `asNondeterministic` as is to prevent the conflict with that
PR,
and then:
```python
def asNonNullable(self):
"""
Updates :class:`UserDefinedFunction` to non-nullable.
.. versionadded:: 2.4
"""
self.nullable = False
return self
```
? I think It won't make a conflict with that PR.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]