zhengruifeng opened a new pull request, #46300:
URL: https://github.com/apache/spark/pull/46300

   ### What changes were proposed in this pull request?
   `UserDefinedFunction.returnType` parse the DDL string
   
   
   ### Why are the changes needed?
   1, the return type check is missing in Python Connect;
   2, to enable a group of tests;
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   yes
   
   
   ```
   In [1]: import pandas as pd
   
   In [2]: from pyspark.sql.functions import pandas_udf
   
   In [3]: @pandas_udf("int")
      ...: def slen(s: pd.Series) -> pd.Series:
      ...:     return s.str.len()
      ...:
   
   In [4]: slen.returnType
   ```
   
   
   before:
   ```
   Out[4]: UnparsedDataType('int')
   ```
   
   after:
   ```
   Out[4]: IntegerType()
   ```
   
   
   ### How was this patch tested?
   enabled tests
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   no


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