HyukjinKwon commented on a change in pull request #23900: [SPARK-23836][PYTHON] Add support for StructType return in Scalar Pandas UDF URL: https://github.com/apache/spark/pull/23900#discussion_r262365143
########## File path: python/pyspark/sql/udf.py ########## @@ -133,6 +133,8 @@ def returnType(self): "UDFs: returnType must be a StructType.") elif self.evalType == PythonEvalType.SQL_GROUPED_AGG_PANDAS_UDF: try: + if isinstance(self._returnType_placeholder, StructType): + raise TypeError Review comment: Yea, either way sounds good to me. I'll leave it to you. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org