You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ueshin (via GitHub)" <gi...@apache.org> on 2025/08/29 00:35:44 UTC

[PR] [SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API [spark]

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

   ### What changes were proposed in this pull request?
   
   Fixes Python UDTF with named table arguments in DataFrame API.
   
   ### Why are the changes needed?
   
   Named table arguments fails with the following error:
   
   ```py
   >>> from pyspark.sql.functions import *
   >>>
   >>> @udtf(returnType="x string")
   ... class TestUDTF:
   ...     def eval(self, x):
   ...         yield str(x),
   ...
   >>> TestUDTF(x=spark.range(10).asTable()).show()
   Traceback (most recent call last):
   ...
   py4j.Py4JException: Method namedArgumentExpression([class java.lang.String, class org.apache.spark.sql.TableArg]) does not exist
   ...
   ```
   
   Also, Spark Connect doesn't recognize table arguments in `analyze`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, named table arguments will be available in DataFrame API.
   
   ### How was this patch tested?
   
   Added the related 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: 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


Re: [PR] [SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API [spark]

Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng commented on PR #52171:
URL: https://github.com/apache/spark/pull/52171#issuecomment-3238364285

   Late LGTM, thank you for the fix!


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


Re: [PR] [SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #52171: [SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API
URL: https://github.com/apache/spark/pull/52171


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


Re: [PR] [SPARK-53431][PYTHON] Fix Python UDTF with named table arguments in DataFrame API [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #52171:
URL: https://github.com/apache/spark/pull/52171#issuecomment-3235639934

   Merged to master.


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