dchvn commented on a change in pull request #35236:
URL: https://github.com/apache/spark/pull/35236#discussion_r787324507
##########
File path: python/pyspark/pandas/typedef/typehints.py
##########
@@ -559,6 +559,9 @@ def infer_return_type(f: Callable) -> Union[SeriesType,
DataFrameType, ScalarTyp
tpe = get_type_hints(f).get("return", None)
+ if tpe is None:
+ raise TypeError("A return value is required for the input function")
Review comment:
That make sense! thanks!
--
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]