yadavay-amzn opened a new pull request, #55950: URL: https://github.com/apache/spark/pull/55950
### What changes were proposed in this pull request? Narrows the check in `ResolveSQLFunctions` that rejects SQL functions in TVF arguments to only reject table-valued functions, allowing scalar UDFs to pass through for normal resolution. ### Why are the changes needed? `SELECT * FROM tvf(scalar_udf(true))` incorrectly throws `AnalysisException: Using SQL function ... in SQLTableFunction is not supported`. Scalar UDFs return scalar values and should be valid TVF arguments. ### Does this PR introduce _any_ user-facing change? Yes -- scalar SQL UDFs can now be used as arguments to table-valued functions. ### How was this patch tested? Added test in `SQLFunctionSuite` that creates a scalar UDF and a TVF, then verifies `SELECT * FROM table_func(scalar_udf(1))` returns the expected result. Test fails without the fix (AnalysisException), passes with it. ### Was this patch authored or co-authored using generative AI tooling? Yes. -- 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]
