Skip to content

Commit

Permalink
Expand test data to cover multiple buffered rows per group.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Aug 10, 2015
1 parent 81956b0 commit 899dce2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ class OuterJoinSuite extends SparkPlanTest with SQLTestUtils {

val left = sqlContext.createDataFrame(sqlContext.sparkContext.parallelize(Seq(
Row(1, 2.0),
Row(2, 1.0), // This row is duplicated to ensure that we will have multiple buffered matches
Row(2, 1.0),
Row(3, 3.0),
Row(null, null)
)), new StructType().add("a", IntegerType).add("b", DoubleType))

val right = sqlContext.createDataFrame(sqlContext.sparkContext.parallelize(Seq(
Row(2, 3.0), // This row is duplicated to ensure that we will have multiple buffered matches
Row(2, 3.0),
Row(3, 2.0),
Row(4, 1.0),
Expand All @@ -112,6 +114,9 @@ class OuterJoinSuite extends SparkPlanTest with SQLTestUtils {
(null, null, null, null),
(1, 2.0, null, null),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(3, 3.0, null, null)
)
)
Expand All @@ -125,6 +130,9 @@ class OuterJoinSuite extends SparkPlanTest with SQLTestUtils {
Seq(
(null, null, null, null),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(null, null, 3, 2.0),
(null, null, 4, 1.0)
)
Expand All @@ -139,6 +147,9 @@ class OuterJoinSuite extends SparkPlanTest with SQLTestUtils {
Seq(
(1, 2.0, null, null),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(2, 1.0, 2, 3.0),
(3, 3.0, null, null),
(null, null, 3, 2.0),
(null, null, 4, 1.0),
Expand Down

0 comments on commit 899dce2

Please sign in to comment.