Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into SparkSQL-merge
Conflicts:
	sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala
  • Loading branch information
Ishiihara committed Nov 9, 2014
commit b13cc4526f0098386b64bce50b2f983f95709f23
30 changes: 11 additions & 19 deletions sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,17 @@ class JoinSuite extends QueryTest with BeforeAndAfterEach {
assert(planned.size === 1)
}

test("join operator selection") {
def assertJoin(sqlString: String, c: Class[_]): Any = {
val rdd = sql(sqlString)
val physical = rdd.queryExecution.sparkPlan
val operators = physical.collect {
case j: ShuffledHashJoin => j
case j: HashOuterJoin => j
case j: LeftSemiJoinHash => j
case j: BroadcastHashJoin => j
case j: LeftSemiJoinBNL => j
case j: CartesianProduct => j
case j: BroadcastNestedLoopJoin => j
case j: MergeJoin => j
}

assert(operators.size === 1)
if (operators(0).getClass() != c) {
fail(s"$sqlString expected operator: $c, but got ${operators(0)}\n physical: \n$physical")
}
def assertJoin(sqlString: String, c: Class[_]): Any = {
val rdd = sql(sqlString)
val physical = rdd.queryExecution.sparkPlan
val operators = physical.collect {
case j: ShuffledHashJoin => j
case j: HashOuterJoin => j
case j: LeftSemiJoinHash => j
case j: BroadcastHashJoin => j
case j: LeftSemiJoinBNL => j
case j: CartesianProduct => j
case j: BroadcastNestedLoopJoin => j
}

assert(operators.size === 1)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.