Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
Push down dereference expression
Browse files Browse the repository at this point in the history
Cherry-pick of trinodb/trino@69ef682

Co-authored-by: qqibrow <[email protected]>
Co-authored-by: Pratham Desai <[email protected]>
  • Loading branch information
3 people committed Aug 1, 2020
1 parent a4f14e4 commit d45962c
Show file tree
Hide file tree
Showing 5 changed files with 859 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import com.facebook.presto.sql.planner.iterative.rule.PruneValuesColumns;
import com.facebook.presto.sql.planner.iterative.rule.PruneWindowColumns;
import com.facebook.presto.sql.planner.iterative.rule.PushAggregationThroughOuterJoin;
import com.facebook.presto.sql.planner.iterative.rule.PushDownDereferences;
import com.facebook.presto.sql.planner.iterative.rule.PushLimitThroughMarkDistinct;
import com.facebook.presto.sql.planner.iterative.rule.PushLimitThroughOuterJoin;
import com.facebook.presto.sql.planner.iterative.rule.PushLimitThroughProject;
Expand Down Expand Up @@ -365,7 +366,14 @@ public PlanOptimizers(
new InlineProjections(metadata.getFunctionManager()),
new RemoveRedundantIdentityProjections(),
new TransformCorrelatedSingleRowSubqueryToProject())),
new CheckSubqueryNodesAreRewritten());
new CheckSubqueryNodesAreRewritten(),
new IterativeOptimizer(
ruleStats,
statsCalculator,
estimatedExchangesCostCalculator,
ImmutableSet.<Rule<?>>builder()
.addAll(new PushDownDereferences(metadata, sqlParser).rules())
.build()));

// TODO: move this before optimization if possible!!
// Replace all expressions with row expressions
Expand Down
Loading

0 comments on commit d45962c

Please sign in to comment.