use of com.facebook.presto.cost.PlanNodeStatsEstimate in project presto by prestodb.
the class MetricComparator method getEstimatedValuesInternal.
private static List<OptionalDouble> getEstimatedValuesInternal(List<Metric> metrics, String query, QueryRunner runner, Session session) // TODO inline back this method
{
Plan queryPlan = runner.createPlan(session, query, WarningCollector.NOOP);
OutputNode outputNode = (OutputNode) queryPlan.getRoot();
PlanNodeStatsEstimate outputNodeStats = queryPlan.getStatsAndCosts().getStats().getOrDefault(queryPlan.getRoot().getId(), PlanNodeStatsEstimate.unknown());
StatsContext statsContext = buildStatsContext(queryPlan, outputNode);
return getEstimatedValues(metrics, outputNodeStats, statsContext);
}
Aggregations