gatorsmile commented on a change in pull request #24752: 
[SPARK-27893][SQL][PYTHON] Create an integrated test base for Python, Scalar 
Pandas, Scala UDF by sql files
URL: https://github.com/apache/spark/pull/24752#discussion_r289270081
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/udf/udf-inner-join.sql
 ##########
 @@ -0,0 +1,17 @@
+-- This test file was converted from inner-join.sql.
+CREATE TEMPORARY VIEW t1 AS SELECT * FROM VALUES (1) AS GROUPING(a);
+CREATE TEMPORARY VIEW t2 AS SELECT * FROM VALUES (1) AS GROUPING(a);
+CREATE TEMPORARY VIEW t3 AS SELECT * FROM VALUES (1), (1) AS GROUPING(a);
+CREATE TEMPORARY VIEW t4 AS SELECT * FROM VALUES (1), (1) AS GROUPING(a);
+
+CREATE TEMPORARY VIEW ta AS
+SELECT udf(a) AS a, udf('a') AS tag FROM t1
+UNION ALL
+SELECT udf(a) AS a, udf('b') AS tag FROM t2;
+
+CREATE TEMPORARY VIEW tb AS
+SELECT udf(a) AS a, udf('a') AS tag FROM t3
+UNION ALL
+SELECT udf(a) AS a, udf('b') AS tag FROM t4;
+
+SELECT tb.* FROM ta INNER JOIN tb ON ta.a = tb.a AND ta.tag = tb.tag;
 
 Review comment:
   Do we have a limitation here? For example, does it work if I try to EXPLAIN 
the query?

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