|
16 | 16 | import com.facebook.presto.common.plan.PlanCanonicalizationStrategy;
|
17 | 17 | import com.facebook.presto.common.resourceGroups.QueryType;
|
18 | 18 | import com.facebook.presto.spi.PrestoWarning;
|
| 19 | +import com.facebook.presto.spi.plan.PlanNode; |
19 | 20 | import com.facebook.presto.spi.plan.PlanNodeId;
|
20 | 21 | import com.facebook.presto.spi.prestospark.PrestoSparkExecutionContext;
|
21 | 22 | import com.facebook.presto.spi.statistics.PlanStatisticsWithSourceInfo;
|
@@ -57,6 +58,7 @@ public class QueryCompletedEvent
|
57 | 58 | private final Set<String> windowFunctions;
|
58 | 59 | private final Optional<PrestoSparkExecutionContext> prestoSparkExecutionContext;
|
59 | 60 | private final Map<PlanCanonicalizationStrategy, String> hboPlanHash;
|
| 61 | + private final Optional<Map<PlanNodeId, PlanNode>> planIdNodeMap; |
60 | 62 |
|
61 | 63 | public QueryCompletedEvent(
|
62 | 64 | QueryMetadata metadata,
|
@@ -84,7 +86,8 @@ public QueryCompletedEvent(
|
84 | 86 | Set<String> aggregateFunctions,
|
85 | 87 | Set<String> windowFunctions,
|
86 | 88 | Optional<PrestoSparkExecutionContext> prestoSparkExecutionContext,
|
87 |
| - Map<PlanCanonicalizationStrategy, String> hboPlanHash) |
| 89 | + Map<PlanCanonicalizationStrategy, String> hboPlanHash, |
| 90 | + Optional<Map<PlanNodeId, PlanNode>> planNodeIdMap) |
88 | 91 | {
|
89 | 92 | this.metadata = requireNonNull(metadata, "metadata is null");
|
90 | 93 | this.statistics = requireNonNull(statistics, "statistics is null");
|
@@ -112,6 +115,7 @@ public QueryCompletedEvent(
|
112 | 115 | this.windowFunctions = requireNonNull(windowFunctions, "windowFunctions is null");
|
113 | 116 | this.prestoSparkExecutionContext = requireNonNull(prestoSparkExecutionContext, "prestoSparkExecutionContext is null");
|
114 | 117 | this.hboPlanHash = requireNonNull(hboPlanHash, "planHash is null");
|
| 118 | + this.planIdNodeMap = requireNonNull(planNodeIdMap, "planNodeIdMap is null"); |
115 | 119 | }
|
116 | 120 |
|
117 | 121 | public QueryMetadata getMetadata()
|
@@ -243,4 +247,9 @@ public Map<PlanCanonicalizationStrategy, String> getHboPlanHash()
|
243 | 247 | {
|
244 | 248 | return hboPlanHash;
|
245 | 249 | }
|
| 250 | + |
| 251 | + public Optional<Map<PlanNodeId, PlanNode>> getPlanNodeIdMap() |
| 252 | + { |
| 253 | + return planIdNodeMap; |
| 254 | + } |
246 | 255 | }
|
0 commit comments