File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -36,34 +36,6 @@ class JoinSuite extends QueryTest {
3636 assert(planned.size === 1 )
3737 }
3838
39- test(" plans broadcast hash join, given hints" ) {
40-
41- def mkTest (buildSide : BuildSide , leftTable : String , rightTable : String ) = {
42- TestSQLContext .set(" spark.sql.join.broadcastTables" ,
43- s " ${if (buildSide == BuildRight ) rightTable else leftTable}" )
44- val rdd = sql(s """ SELECT * FROM $leftTable JOIN $rightTable ON key = a """ )
45- // Using `sparkPlan` because for relevant patterns in HashJoin to be
46- // matched, other strategies need to be applied.
47- val physical = rdd.queryExecution.sparkPlan
48- val bhj = physical.collect { case j : BroadcastHashJoin if j.buildSide == buildSide => j }
49-
50- assert(bhj.size === 1 , " planner does not pick up hint to generate broadcast hash join" )
51- checkAnswer(
52- rdd,
53- Seq (
54- (1 , " 1" , 1 , 1 ),
55- (1 , " 1" , 1 , 2 ),
56- (2 , " 2" , 2 , 1 ),
57- (2 , " 2" , 2 , 2 ),
58- (3 , " 3" , 3 , 1 ),
59- (3 , " 3" , 3 , 2 )
60- ))
61- }
62-
63- mkTest(BuildRight , " testData" , " testData2" )
64- mkTest(BuildLeft , " testData" , " testData2" )
65- }
66-
6739 test(" multiple-key equi-join is hash-join" ) {
6840 val x = testData2.as(' x )
6941 val y = testData2.as(' y )
You can’t perform that action at this time.
0 commit comments