BryanCutler 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_r262351548
##########
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:
Sure. I will try it as a followup, but a message for now will be good. I
just noticed that grouped map wasn't catching a nested struct type, so I need
to fix that anyway.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]