use of com.facebook.presto.benchmark.prestoaction.PrestoAction in project presto by prestodb.
the class AbstractPhaseExecutor method runQuery.
protected BenchmarkQueryEvent runQuery(BenchmarkQuery benchmarkQuery) {
Optional<QueryStats> queryStats = Optional.empty();
Statement statement = sqlParser.createStatement(benchmarkQuery.getQuery(), parsingOptions);
PrestoAction prestoAction = prestoActionFactory.get(benchmarkQuery);
try {
queryStats = Optional.of(prestoAction.execute(statement));
return buildEvent(benchmarkQuery, queryStats, Optional.empty());
} catch (QueryException e) {
return buildEvent(benchmarkQuery, queryStats, Optional.of(e));
} catch (Throwable t) {
log.error(t);
return buildEvent(benchmarkQuery, queryStats, Optional.empty());
}
}
Aggregations