presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java/SqlQueryExecution/getBasicQueryInfo
class SqlQueryExecution:    @Override
    public BasicQueryInfo getBasicQueryInfo()
    {
        return stateMachine.getFinalQueryInfo()
                .map(BasicQueryInfo::new)
                .orElseGet(() -> stateMachine.getBasicQueryInfo(Optional.ofNullable(queryScheduler.get()).map(SqlQueryScheduler::getBasicStageStats)));
    }