Skip to content

Commit

Permalink
Use track statistics flag to control hbo stats update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaystarshot authored and pranjalssh committed Aug 21, 2023
1 parent fea80c9 commit 7743de0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ private double adjustedOutputBytes(PlanNode planNode, PlanNodeStats planNodeStat
public void updateStatistics(QueryInfo queryInfo)
{
Session session = queryInfo.getSession().toSession(sessionPropertyManager);
if (!trackHistoryBasedPlanStatisticsEnabled(session)) {
return;
}
Map<PlanNodeWithHash, PlanStatisticsWithSourceInfo> planStatistics = getQueryStats(queryInfo);
Map<PlanNodeWithHash, HistoricalPlanStatistics> historicalPlanStatisticsMap =
historyBasedPlanStatisticsProvider.get().getStats(planStatistics.keySet().stream().collect(toImmutableList()), getHistoryBasedOptimizerTimeoutLimit(session).toMillis());
Expand Down

0 comments on commit 7743de0

Please sign in to comment.