xinrong-meng opened a new pull request, #48914: URL: https://github.com/apache/spark/pull/48914
### What changes were proposed in this pull request? We want to implement a function df.argument(), which returns a Column object. This Column can then be passed as input to call a User-Defined Table Function (UDTF). The PR targets at Spark Classic only. ### Why are the changes needed? To reach parity with SQL functionality, specifically, https://github.com/apache/spark/pull/41750. ### Does this PR introduce _any_ user-facing change? Yes. For example: ```py >>> @udtf(returnType="a: int") ... class TestUDTF: ... def eval(self, row: Row): ... if row[0] > 5: ... yield row[0], ... >>> df.argument() Column<'functiontablesubqueryargumentexpression()'> >>> TestUDTF(df.argument()).show() +---+ | a| +---+ | 6| | 7| +---+ ``` ### How was this patch tested? Unit 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]
