manuzhang opened a new pull request #25088: [SPARK-27922][SQL][PYTHON] Convert 
and port 'natural-join.sql' into U…
URL: https://github.com/apache/spark/pull/25088
 
 
   …DF test base
   
   ## What changes were proposed in this pull request?
   
   This PR adds some tests converted from `natural-join.sql` to test UDFs 
following the combination guide in  
[SPARK-27921](https://issues.apache.org/jira/browse/SPARK-27921).
   
   <details><summary>Diff results comparing to `natural-join.sql`</summary>
   <p>
   
   ```diff
   diff --git 
a/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out 
b/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.
   sql.out
   index 43f2f9a..53ef177 100644
   --- 
a/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out
   +++ 
b/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out
   @@ -27,7 +27,7 @@ struct<>
   
   
    -- !query 2
   -SELECT * FROM nt1 natural join nt2 where k = "one"
   +SELECT * FROM nt1 natural join nt2 where udf(k) = "one"
    -- !query 2 schema
    struct<k:string,v1:int,v2:int>
    -- !query 2 output
   @@ -36,7 +36,7 @@ one   1       5
   
   
    -- !query 3
   -SELECT * FROM nt1 natural left join nt2 order by v1, v2
   +SELECT * FROM nt1 natural left join nt2 where k <> udf("") order by v1, v2
    -- !query 3 schema
   diff --git 
a/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out 
b/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.
   sql.out
   index 43f2f9a..53ef177 100644
   --- 
a/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out
   +++ 
b/sql/core/src/test/resources/sql-tests/results/udf/udf-natural-join.sql.out
   @@ -27,7 +27,7 @@ struct<>
   
   
    -- !query 2
   -SELECT * FROM nt1 natural join nt2 where k = "one"
   +SELECT * FROM nt1 natural join nt2 where udf(k) = "one"
    -- !query 2 schema
    struct<k:string,v1:int,v2:int>
    -- !query 2 output
   @@ -36,7 +36,7 @@ one   1       5
   
   
    -- !query 3
   -SELECT * FROM nt1 natural left join nt2 order by v1, v2
   +SELECT * FROM nt1 natural left join nt2 where k <> udf("") order by v1, v2
    -- !query 3 schema
    struct<k:string,v1:int,v2:int>
   ```
   
   </p>
   </details>
   
   ## How was this patch tested?
   
   Tested as guided in 
[SPARK-27921](https://issues.apache.org/jira/browse/SPARK-27921).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to