HyukjinKwon commented on a change in pull request #31429:
URL: https://github.com/apache/spark/pull/31429#discussion_r568326045
##########
File path: python/pyspark/sql/tests/test_pandas_map.py
##########
@@ -112,6 +112,14 @@ def func(iterator):
expected = df.collect()
self.assertEqual(actual, expected)
+ def test_self_join(self):
+ # SPARK-34319: self-join with MapInPandas
+ df1 = self.spark.range(10)
+ df2 = df1.mapInPandas(lambda iter: iter, 'id long')
+ actual = df2.join(df2).collect()
+ expected = df1.join(df1).collect()
+ self.assertEqual(actual, expected)
Review comment:
```suggestion
self.assertEqual(sorted(actual), sorted(expected))
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]