HyukjinKwon commented on code in PR #46300:
URL: https://github.com/apache/spark/pull/46300#discussion_r1586986177
##########
python/pyspark/sql/connect/udf.py:
##########
@@ -148,15 +150,35 @@ def __init__(
)
self.func = func
- self.returnType: DataType = (
- UnparsedDataType(returnType) if isinstance(returnType, str) else
returnType
- )
+ self._returnType = returnType
+ self._returnType_placeholder: Optional[DataType] = None
self._name = name or (
func.__name__ if hasattr(func, "__name__") else
func.__class__.__name__
)
self.evalType = evalType
self.deterministic = deterministic
+ @property
+ def returnType(self) -> DataType:
Review Comment:
Yes, it is. I think it's fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]