Skip to content

Commit 2c5f929

Browse files
committed
Fix compilation failure after merging AddExchangeBeforeGroupId
1 parent e84e4d2 commit 2c5f929

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

presto-main/src/main/java/com/facebook/presto/sql/planner/PlanOptimizers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ public PlanOptimizers(
929929
ruleStats,
930930
statsCalculator,
931931
costCalculator,
932-
new AddExchangesBelowPartialAggregationOverGroupIdRuleSet(taskCountEstimator, taskManagerConfig, metadata).rules()));
932+
new AddExchangesBelowPartialAggregationOverGroupIdRuleSet(taskCountEstimator, taskManagerConfig, metadata, featuresConfig.isNativeExecutionEnabled()).rules()));
933933

934934
builder.add(new IterativeOptimizer(
935935
metadata,

presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/AddExchangesBelowPartialAggregationOverGroupIdRuleSet.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,18 @@ public class AddExchangesBelowPartialAggregationOverGroupIdRuleSet
130130
private final TaskCountEstimator taskCountEstimator;
131131
private final DataSize maxPartialAggregationMemoryUsage;
132132
private final Metadata metadata;
133+
private final boolean nativeExecution;
133134

134135
public AddExchangesBelowPartialAggregationOverGroupIdRuleSet(
135136
TaskCountEstimator taskCountEstimator,
136137
TaskManagerConfig taskManagerConfig,
137-
Metadata metadata)
138+
Metadata metadata,
139+
boolean nativeExecution)
138140
{
139141
this.taskCountEstimator = requireNonNull(taskCountEstimator, "taskCountEstimator is null");
140142
this.maxPartialAggregationMemoryUsage = taskManagerConfig.getMaxPartialAggregationMemoryUsage();
141143
this.metadata = metadata;
144+
this.nativeExecution = nativeExecution;
142145
}
143146

144147
public Set<Rule<?>> rules()
@@ -355,7 +358,7 @@ private StreamProperties derivePropertiesRecursively(PlanNode node, Context cont
355358
List<StreamProperties> inputProperties = resolvedPlanNode.getSources().stream()
356359
.map(source -> derivePropertiesRecursively(source, context))
357360
.collect(toImmutableList());
358-
return deriveProperties(resolvedPlanNode, inputProperties, metadata, context.getSession());
361+
return deriveProperties(resolvedPlanNode, inputProperties, metadata, context.getSession(), nativeExecution);
359362
}
360363
}
361364
}

presto-main/src/test/java/com/facebook/presto/sql/planner/iterative/rule/TestAddExchangesBelowPartialAggregationOverGroupIdRuleSet.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ private static AddExchangesBelowPartialAggregationOverGroupIdRuleSet.AddExchange
6262
return new AddExchangesBelowPartialAggregationOverGroupIdRuleSet(
6363
taskCountEstimator,
6464
taskManagerConfig,
65-
ruleTester.getMetadata()
65+
ruleTester.getMetadata(),
66+
false
6667
).belowExchangeRule();
6768
}
6869

@@ -73,7 +74,8 @@ private static AddExchangesBelowPartialAggregationOverGroupIdRuleSet.AddExchange
7374
return new AddExchangesBelowPartialAggregationOverGroupIdRuleSet(
7475
taskCountEstimator,
7576
taskManagerConfig,
76-
ruleTester.getMetadata()
77+
ruleTester.getMetadata(),
78+
false
7779
).belowProjectionRule();
7880
}
7981

0 commit comments

Comments
 (0)