xinrong-meng opened a new pull request, #38778:
URL: https://github.com/apache/spark/pull/38778

   ### What changes were proposed in this pull request?
   Implement `DataFrame.crossJoin` for Spark Connect.
   
   ### Why are the changes needed?
   Part of [SPARK-39375](https://issues.apache.org/jira/browse/SPARK-39375).
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. Spark Connect users can use `DataFrame.crossJoin` as below:
   
   ```py
   >>> from pyspark.sql.connect.client import RemoteSparkSession
   >>> cspark = RemoteSparkSession()
   >>> df = cspark.range(1, 3)
   >>> df.crossJoin(df).show()
   +---+---+
   | id| id|
   +---+---+
   |  1|  1|
   |  1|  2|
   |  2|  1|
   |  2|  2|
   +---+---+
   
   >>> df.crossJoin(df)._plan.to_proto(cspark)
   root {
     join {
       left {
         range {
           start: 1
           end: 3
           step: 1
         }
       }
       right {
         range {
           start: 1
           end: 3
           step: 1
         }
       }
       join_type: JOIN_TYPE_CROSS
     }
   }
   ```
   
   ### How was this patch tested?
   Unit tests.


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to