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


##########
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:
   The error was:
   
   ```
   python/pyspark/sql/conversion.py:1501: error: Argument 1 to "apply" of 
"Series" has incompatible type "Callable[[Any], VariantVal | None]"; expected 
"Callable[..., str | bytes | date | datetime | timedelta | <15 more items> | 
None]"  [arg-type]
   python/pyspark/sql/conversion.py:1501: error: Incompatible return value type 
(got "VariantVal | None", expected "str | bytes | date | datetime | timedelta | 
<15 more items> | None")  [return-value]
   ```
   
   We could also ignore it here to keep it simple.



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