Skip to content

Commit

Permalink
change code
Browse files Browse the repository at this point in the history
  • Loading branch information
huleilei committed Mar 22, 2018
1 parent 69e0981 commit 80b714e
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -53,6 +53,7 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
PushProjectionThroughUnion,
ReorderJoin,
EliminateOuterJoin,
RewritePredicateSubquery,
PushPredicateThroughJoin,
PushDownPredicate,
LimitPushDown,
Expand Down Expand Up @@ -134,11 +135,6 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
ReplaceExceptWithFilter,
ReplaceExceptWithAntiJoin,
ReplaceDistinctWithAggregate) ::
Batch("RewriteSubquery", Once,
RewritePredicateSubquery,
ColumnPruning,
CollapseProject,
RemoveRedundantProject) ::
Batch("Aggregate", fixedPoint,
RemoveLiteralFromGroupExpressions,
RemoveRepetitionFromGroupExpressions) :: Nil ++
Expand All @@ -155,7 +151,13 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
PropagateEmptyRelation) :+
// The following batch should be executed after batch "Join Reorder" and "LocalRelation".
Batch("Check Cartesian Products", Once,
CheckCartesianProducts)
CheckCartesianProducts) :+
Batch("RewriteSubquery", Once,
ColumnPruning,
CollapseProject,
RemoveRedundantProject)


}

/**
Expand Down

0 comments on commit 80b714e

Please sign in to comment.