You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/18 02:05:43 UTC
[GitHub] [spark] xinrong-meng commented on a diff in pull request #37560: [SPARK-40130][PYTHON] Support NumPy scalars in built-in functions
xinrong-meng commented on code in PR #37560:
URL: https://github.com/apache/spark/pull/37560#discussion_r948585516
##########
python/pyspark/sql/types.py:
##########
@@ -2256,11 +2256,27 @@ def convert(self, obj: datetime.timedelta, gateway_client: GatewayClient) -> Jav
)
+class NumpyScalarConverter:
+ def can_convert(self, obj: Any) -> bool:
+ try:
+ import numpy as np
Review Comment:
Good idea! Will do.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org