You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2023/03/03 02:46:46 UTC

[GitHub] [spark] xinrong-meng commented on a diff in pull request #40260: [SPARK-42630][CONNECT][PYTHON] Delay parsing DDL string until SparkConnectClient is available

xinrong-meng commented on code in PR #40260:
URL: https://github.com/apache/spark/pull/40260#discussion_r1123974740


##########
python/pyspark/sql/connect/udf.py:
##########
@@ -99,9 +97,7 @@ def __init__(
             )
 
         self.func = func
-        self._returnType = (
-            parse_data_type(returnType) if isinstance(returnType, str) else returnType
-        )
+        self._returnType = returnType

Review Comment:
   In the vanilla PySpark, a `returnType` property is defined as https://github.com/apache/spark/blob/master/python/pyspark/sql/udf.py#L233, which returns DataType always.
   
   In the existing Connect's code, `wrapper.returnType = self._returnType` is utilized instead.
   
   I am afraid that line of change may break that property parity.



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