-
-
Save SingularBunny/1d6cbf9dd7aed3a9a0dcea8ef79448e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DataFrameJoinSuite extends QueryTest with SharedSparkSession { | |
import testImplicits._ | |
test("join - join using") { | |
val df = Seq(1, 2, 3).map(i => (i, i.toString)).toDF("int", "str") | |
val df2 = Seq(1, 2, 3).map(i => (i, (i + 1).toString)).toDF("int", "str") | |
checkAnswer( | |
df.join(df2, "int"), | |
Row(1, "1", "2") :: Row(2, "2", "3") :: Row(3, "3", "4") :: Nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment