Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanhovell committed Jun 10, 2016
1 parent 995c86a commit 08cc611
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -271,4 +271,19 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
)
)
}

{
def df: DataFrame = spark.range(3).selectExpr("struct(id, id) as key", "id as value")
lazy val left = df.selectExpr("key", "concat('L', value) as value").alias("left")
lazy val right = df.selectExpr("key", "concat('R', value) as value").alias("right")
testInnerJoin(
"SPARK-15822 - test structs as keys",
left,
right,
() => (left.col("key") === right.col("key")).expr,
Seq(
(Row(0, 0), "L0", Row(0, 0), "R0"),
(Row(1, 1), "L1", Row(1, 1), "R1"),
(Row(2, 2), "L2", Row(2, 2), "R2")))
}
}

0 comments on commit 08cc611

Please sign in to comment.