Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
case e @ EvaluatePython(udf, child, _) =>
BatchPythonEvaluation(udf, e.output, planLater(child)) :: Nil
case LogicalRDD(output, rdd) => PhysicalRDD(output, rdd, "ExistingRDD") :: Nil
case BroadcastHint(child) => apply(child)
case BroadcastHint(child) => planLater(child) :: Nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite obvious, apply method will only make the rules within the object BasicOperators applied, but the data source(Parquet) is an extended strategy defined in another object, planLater means to search the all of the strategies(including the extensions), which is make more sense. That's why it caused exception says No plan for BroadcastHint as apply(child) returns Nil.

case _ => Nil
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,12 @@ class DataFrameJoinSuite extends QueryTest with SharedSQLContext {

// planner should not crash without a join
broadcast(df1).queryExecution.executedPlan

// SPARK-12275: no physical plan for BroadcastHint in some condition
withTempPath { path =>
df1.write.parquet(path.getCanonicalPath)
val pf1 = sqlContext.read.parquet(path.getCanonicalPath)
assert(df1.join(broadcast(pf1)).count() === 4)
}
}
}