fangchenli commented on code in PR #54312:
URL: https://github.com/apache/spark/pull/54312#discussion_r2825577656


##########
python/pyspark/sql/conversion.py:
##########
@@ -1489,13 +1490,20 @@ def convert_numpy(
                 if v is not None
                 else None
             )
+        elif isinstance(spark_type, VariantType):
+            series = arr.to_pandas(date_as_object=True)
+            series = series.apply(
+                cast(

Review Comment:
   Yes, the result series would have `dtype=object`. And we should use `map` 
instead of `apply` here. In the stub file, `map` takes `Callable[Any]`, but 
`apply` only takes a dtype known to pandas.



-- 
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]

Reply via email to