marko-radoicic-db opened a new pull request, #60753:
URL: https://github.com/apache/spark/pull/60753

   ### What changes were proposed in this pull request?
   
   This PR adds golden-file tests for SQL scalar UDFs used in `JOIN ... ON` 
conditions to `sql/core/src/test/resources/sql-tests/inputs/sql-udf.sql`. The 
new cases cover:
   
   - A temporary SQL UDF (`foo3_1h`) in an inner join, created and dropped 
within the test.
   - A SQL UDF in a `LEFT OUTER JOIN` condition.
   - A SQL UDF in a `LEFT SEMI JOIN` condition.
   - A SQL UDF with a parameter default (`foo3_1i`) in an inner join.
   
   The corresponding `results/sql-udf.sql.out` and 
`analyzer-results/sql-udf.sql.out` golden files are regenerated. Existing 
entries are unchanged.
   
   ### Why are the changes needed?
   
   The existing `-- in join` cases in `sql-udf.sql` do not cover temporary SQL 
UDFs, outer or semi joins, or functions that rely on parameter defaults inside 
a join condition. These cases check that the function inputs are inlined 
correctly into the join condition for these forms.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This PR only adds test cases and golden files.
   
   ### How was this patch tested?
   
   The golden files were regenerated with `SPARK_GENERATE_GOLDEN_FILES=1`:
   
   ```
   SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly 
org.apache.spark.sql.SQLQueryTestSuite -- -z sql-udf.sql"
   ```
   
   The regeneration run completed successfully, and the regenerated output for 
the new queries was reviewed. The diff contains only the added entries for the 
new queries.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Isaac (Claude Code)
   
   This pull request and its description were written by Isaac.
   


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