Skip to content

Commit

Permalink
Move TranslateExpressions above AddLocalExchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
hellium01 authored and highker committed Aug 22, 2019
1 parent dc11cda commit 8b5d746
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,6 @@ public PlanOptimizers(
.add(new InlineProjections())
.build()));

// Optimizers above this don't understand local exchanges, so be careful moving this.
builder.add(new AddLocalExchanges(metadata, sqlParser));

// TODO: move this before optimization if possible!!
// Replace all expressions with row expressions
builder.add(new IterativeOptimizer(
Expand All @@ -502,6 +499,9 @@ public PlanOptimizers(
new TranslateExpressions(metadata, sqlParser).rules()));
// After this point, all planNodes should not contain OriginalExpression

// Optimizers above this don't understand local exchanges, so be careful moving this.
builder.add(new AddLocalExchanges(metadata, sqlParser));

// Optimizers above this do not need to care about aggregations with the type other than SINGLE
// This optimizer must be run after all exchange-related optimizers
builder.add(new IterativeOptimizer(
Expand Down

0 comments on commit 8b5d746

Please sign in to comment.