diff options
author | Reynold Xin <rxin@databricks.com> | 2016-02-24 11:58:12 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-02-24 11:58:12 -0800 |
commit | 382b27babf7771b724f7abff78195a858631d138 (patch) | |
tree | 8d757ef721becded4c3eb86c7a6f756416b3ccf4 /sql/core | |
parent | f3739869973ba4285196a61775d891292b8e282b (diff) | |
download | spark-382b27babf7771b724f7abff78195a858631d138.tar.gz spark-382b27babf7771b724f7abff78195a858631d138.tar.bz2 spark-382b27babf7771b724f7abff78195a858631d138.zip |
Revert "[SPARK-13383][SQL] Keep broadcast hint after column pruning"
This reverts commit f3739869973ba4285196a61775d891292b8e282b.
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala index 247eb054a8..7347156398 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala @@ -81,13 +81,11 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] { * Matches a plan whose output should be small enough to be used in broadcast join. */ object CanBroadcast { - def unapply(plan: LogicalPlan): Option[LogicalPlan] = { - if (sqlContext.conf.autoBroadcastJoinThreshold > 0 && - plan.statistics.sizeInBytes <= sqlContext.conf.autoBroadcastJoinThreshold) { - Some(plan) - } else { - None - } + def unapply(plan: LogicalPlan): Option[LogicalPlan] = plan match { + case BroadcastHint(p) => Some(p) + case p if sqlContext.conf.autoBroadcastJoinThreshold > 0 && + p.statistics.sizeInBytes <= sqlContext.conf.autoBroadcastJoinThreshold => Some(p) + case _ => None } } |