Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
LantaoJin committed Jul 15, 2020
1 parent 8682eec commit e56f5d4
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -79,8 +79,9 @@ abstract class Optimizer(catalogManager: CatalogManager)
LimitPushDown,
ColumnPruning,
InferFiltersFromConstraints,
// Operator combine
// Add repartition
RepartitionForCoalesceWithJoin,
// Operator combine
CollapseRepartition,
CollapseProject,
CollapseWindow,
Expand Down Expand Up @@ -1810,7 +1811,7 @@ object OptimizeLimitZero extends Rule[LogicalPlan] {
object RepartitionForCoalesceWithJoin extends Rule[LogicalPlan] {
def apply(plan: LogicalPlan): LogicalPlan = plan transform {
case r @ Repartition(numPartitions, shuffle, child)
if !shuffle && child.find(_.isInstanceOf[Join]).isDefined =>
r.copy(child = Repartition(numPartitions, true, child))
if !shuffle && child.find(_.isInstanceOf[Join]).isDefined =>
r.copy(child = Repartition(numPartitions, shuffle = true, child))
}
}

0 comments on commit e56f5d4

Please sign in to comment.