Search in sources :

Example 1 with DeterminismAnalysisDetails

use of com.facebook.presto.verifier.event.DeterminismAnalysisDetails in project presto by prestodb.

the class DeterminismAnalyzer method analyze.

private DeterminismAnalysis analyze(QueryObjectBundle control, ChecksumResult controlChecksum, DeterminismAnalysisDetails.Builder determinismAnalysisDetails) {
    // Handle mutable catalogs
    if (isNonDeterministicCatalogReferenced(control.getQuery())) {
        return NON_DETERMINISTIC_CATALOG;
    }
    // Handle limit query
    LimitQueryDeterminismAnalysis limitQueryAnalysis = new LimitQueryDeterminismAnalyzer(prestoAction, handleLimitQuery, control.getQuery(), controlChecksum.getRowCount(), determinismAnalysisDetails).analyze();
    switch(limitQueryAnalysis) {
        case NOT_RUN:
        case FAILED_QUERY_FAILURE:
        case DETERMINISTIC:
            // try the next analysis
            break;
        case NON_DETERMINISTIC:
            return NON_DETERMINISTIC_LIMIT_CLAUSE;
        case FAILED_DATA_CHANGED:
            return ANALYSIS_FAILED_DATA_CHANGED;
        default:
            throw new IllegalArgumentException(format("Invalid limitQueryAnalysis: %s", limitQueryAnalysis));
    }
    // Rerun control query multiple times
    List<Column> columns = getColumns(prestoAction, typeManager, control.getObjectName());
    Map<QueryBundle, DeterminismAnalysisRun.Builder> queryRuns = new HashMap<>();
    try {
        for (int i = 0; i < maxAnalysisRuns; i++) {
            QueryObjectBundle queryBundle = queryRewriter.rewriteQuery(sourceQuery.getQuery(CONTROL), CONTROL);
            DeterminismAnalysisRun.Builder run = determinismAnalysisDetails.addRun().setTableName(queryBundle.getObjectName().toString());
            queryRuns.put(queryBundle, run);
            // Rerun setup and main query
            queryBundle.getSetupQueries().forEach(query -> runAndConsume(() -> prestoAction.execute(query, DETERMINISM_ANALYSIS_SETUP), stats -> stats.getQueryStats().map(QueryStats::getQueryId).ifPresent(run::addSetupQueryId)));
            runAndConsume(() -> prestoAction.execute(queryBundle.getQuery(), DETERMINISM_ANALYSIS_MAIN), stats -> stats.getQueryStats().map(QueryStats::getQueryId).ifPresent(run::setQueryId));
            // Run checksum query
            Query checksumQuery = checksumValidator.generateChecksumQuery(queryBundle.getObjectName(), columns);
            ChecksumResult testChecksum = getOnlyElement(callAndConsume(() -> prestoAction.execute(checksumQuery, DETERMINISM_ANALYSIS_CHECKSUM, ChecksumResult::fromResultSet), stats -> stats.getQueryStats().map(QueryStats::getQueryId).ifPresent(run::setChecksumQueryId)).getResults());
            DeterminismAnalysis analysis = matchResultToDeterminism(match(checksumValidator, columns, columns, controlChecksum, testChecksum));
            if (analysis != DETERMINISTIC) {
                return analysis;
            }
        }
        return DETERMINISTIC;
    } catch (QueryException qe) {
        return ANALYSIS_FAILED_QUERY_FAILURE;
    } finally {
        if (runTeardown) {
            queryRuns.forEach((queryBundle, run) -> teardownSafely(prestoAction, Optional.of(queryBundle), queryStats -> queryStats.getQueryStats().map(QueryStats::getQueryId).ifPresent(run::addTeardownQueryId)));
        }
    }
}
Also used : NON_DETERMINISTIC_ROW_COUNT(com.facebook.presto.verifier.framework.DeterminismAnalysis.NON_DETERMINISTIC_ROW_COUNT) Table(com.facebook.presto.sql.tree.Table) DataVerificationUtil.match(com.facebook.presto.verifier.framework.DataVerificationUtil.match) ANALYSIS_FAILED_DATA_CHANGED(com.facebook.presto.verifier.framework.DeterminismAnalysis.ANALYSIS_FAILED_DATA_CHANGED) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DETERMINISTIC(com.facebook.presto.verifier.framework.DeterminismAnalysis.DETERMINISTIC) VerifierUtil.callAndConsume(com.facebook.presto.verifier.framework.VerifierUtil.callAndConsume) NON_DETERMINISTIC_CATALOG(com.facebook.presto.verifier.framework.DeterminismAnalysis.NON_DETERMINISTIC_CATALOG) NON_DETERMINISTIC_COLUMNS(com.facebook.presto.verifier.framework.DeterminismAnalysis.NON_DETERMINISTIC_COLUMNS) DataVerificationUtil.getColumns(com.facebook.presto.verifier.framework.DataVerificationUtil.getColumns) TypeManager(com.facebook.presto.common.type.TypeManager) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) QueryStats(com.facebook.presto.jdbc.QueryStats) ANALYSIS_FAILED_INCONSISTENT_SCHEMA(com.facebook.presto.verifier.framework.DeterminismAnalysis.ANALYSIS_FAILED_INCONSISTENT_SCHEMA) QueryRewriter(com.facebook.presto.verifier.rewrite.QueryRewriter) DETERMINISM_ANALYSIS_SETUP(com.facebook.presto.verifier.framework.QueryStage.DETERMINISM_ANALYSIS_SETUP) DeterminismAnalysisRun(com.facebook.presto.verifier.event.DeterminismAnalysisRun) ANALYSIS_FAILED_QUERY_FAILURE(com.facebook.presto.verifier.framework.DeterminismAnalysis.ANALYSIS_FAILED_QUERY_FAILURE) DETERMINISM_ANALYSIS_CHECKSUM(com.facebook.presto.verifier.framework.QueryStage.DETERMINISM_ANALYSIS_CHECKSUM) ImmutableSet(com.google.common.collect.ImmutableSet) DataVerificationUtil.teardownSafely(com.facebook.presto.verifier.framework.DataVerificationUtil.teardownSafely) Query(com.facebook.presto.sql.tree.Query) Node(com.facebook.presto.sql.tree.Node) AstVisitor(com.facebook.presto.sql.tree.AstVisitor) Set(java.util.Set) Iterables.getOnlyElement(com.google.common.collect.Iterables.getOnlyElement) CONTROL(com.facebook.presto.verifier.framework.ClusterType.CONTROL) String.format(java.lang.String.format) ChecksumResult(com.facebook.presto.verifier.checksum.ChecksumResult) DeterminismAnalysisDetails(com.facebook.presto.verifier.event.DeterminismAnalysisDetails) List(java.util.List) VerifierUtil.runAndConsume(com.facebook.presto.verifier.framework.VerifierUtil.runAndConsume) ChecksumValidator(com.facebook.presto.verifier.checksum.ChecksumValidator) PrestoAction(com.facebook.presto.verifier.prestoaction.PrestoAction) Optional(java.util.Optional) VisibleForTesting(com.google.common.annotations.VisibleForTesting) NON_DETERMINISTIC_LIMIT_CLAUSE(com.facebook.presto.verifier.framework.DeterminismAnalysis.NON_DETERMINISTIC_LIMIT_CLAUSE) DETERMINISM_ANALYSIS_MAIN(com.facebook.presto.verifier.framework.QueryStage.DETERMINISM_ANALYSIS_MAIN) Statement(com.facebook.presto.sql.tree.Statement) ChecksumResult(com.facebook.presto.verifier.checksum.ChecksumResult) Query(com.facebook.presto.sql.tree.Query) HashMap(java.util.HashMap) QueryStats(com.facebook.presto.jdbc.QueryStats) DeterminismAnalysisRun(com.facebook.presto.verifier.event.DeterminismAnalysisRun)

Example 2 with DeterminismAnalysisDetails

use of com.facebook.presto.verifier.event.DeterminismAnalysisDetails in project presto by prestodb.

the class AbstractVerification method run.

@Override
public VerificationResult run() {
    Optional<B> control = Optional.empty();
    Optional<B> test = Optional.empty();
    Optional<QueryResult<V>> controlQueryResult = Optional.empty();
    Optional<QueryResult<V>> testQueryResult = Optional.empty();
    QueryContext controlQueryContext = new QueryContext();
    QueryContext testQueryContext = new QueryContext();
    ChecksumQueryContext controlChecksumQueryContext = new ChecksumQueryContext();
    ChecksumQueryContext testChecksumQueryContext = new ChecksumQueryContext();
    Optional<R> matchResult = Optional.empty();
    Optional<DeterminismAnalysisDetails> determinismAnalysisDetails = Optional.empty();
    Optional<PartialVerificationResult> partialResult = Optional.empty();
    Optional<Throwable> throwable = Optional.empty();
    try {
        // Rewrite queries
        if (!skipControl) {
            control = Optional.of(getQueryRewrite(CONTROL));
        }
        test = Optional.of(getQueryRewrite(TEST));
        // Run control queries
        if (!skipControl) {
            QueryBundle controlQueryBundle = control.get();
            QueryAction controlSetupAction = setupOnMainClusters ? queryActions.getControlAction() : queryActions.getHelperAction();
            controlQueryBundle.getSetupQueries().forEach(query -> runAndConsume(() -> controlSetupAction.execute(query, CONTROL_SETUP), controlQueryContext::addSetupQuery, controlQueryContext::setException));
            controlQueryResult = runMainQuery(controlQueryBundle.getQuery(), CONTROL, controlQueryContext);
            controlQueryContext.setState(QueryState.SUCCEEDED);
        } else {
            controlQueryContext.setState(NOT_RUN);
        }
        // Run test queries
        QueryBundle testQueryBundle = test.get();
        QueryAction testSetupAction = setupOnMainClusters ? queryActions.getTestAction() : queryActions.getHelperAction();
        testQueryBundle.getSetupQueries().forEach(query -> runAndConsume(() -> testSetupAction.execute(query, TEST_SETUP), testQueryContext::addSetupQuery, testQueryContext::setException));
        testQueryResult = runMainQuery(testQueryBundle.getQuery(), TEST, testQueryContext);
        testQueryContext.setState(QueryState.SUCCEEDED);
        // Verify results
        if (!skipControl && !skipChecksum) {
            matchResult = Optional.of(verify(control.get(), test.get(), controlQueryResult, testQueryResult, controlChecksumQueryContext, testChecksumQueryContext));
            // Determinism analysis
            if (matchResult.get().isMismatchPossiblyCausedByNonDeterminism()) {
                determinismAnalysisDetails = Optional.of(analyzeDeterminism(control.get(), matchResult.get()));
            }
        }
        partialResult = Optional.of(concludeVerificationPartial(control, test, controlQueryContext, testQueryContext, matchResult, determinismAnalysisDetails, Optional.empty()));
    } catch (Throwable t) {
        if (exceptionClassifier.shouldResubmit(t) && verificationContext.getResubmissionCount() < verificationResubmissionLimit) {
            return new VerificationResult(this, true, Optional.empty());
        }
        throwable = Optional.of(t);
        partialResult = Optional.of(concludeVerificationPartial(control, test, controlQueryContext, testQueryContext, matchResult, determinismAnalysisDetails, Optional.of(t)));
    } finally {
        if (!smartTeardown || testQueryContext.getState() != QueryState.SUCCEEDED || (partialResult.isPresent() && partialResult.get().getStatus().equals(SUCCEEDED))) {
            QueryAction controlTeardownAction = teardownOnMainClusters ? queryActions.getControlAction() : queryActions.getHelperAction();
            QueryAction testTeardownAction = teardownOnMainClusters ? queryActions.getTestAction() : queryActions.getHelperAction();
            teardownSafely(controlTeardownAction, control, controlQueryContext::addTeardownQuery);
            teardownSafely(testTeardownAction, test, testQueryContext::addTeardownQuery);
        }
    }
    return concludeVerification(partialResult.get(), control, test, controlQueryResult, testQueryResult, controlQueryContext, testQueryContext, matchResult, controlChecksumQueryContext, testChecksumQueryContext, determinismAnalysisDetails, throwable);
}
Also used : QueryAction(com.facebook.presto.verifier.prestoaction.QueryAction) VERIFIER_INTERNAL_ERROR(com.facebook.presto.verifier.framework.SkippedReason.VERIFIER_INTERNAL_ERROR) DeterminismAnalysisDetails(com.facebook.presto.verifier.event.DeterminismAnalysisDetails)

Example 3 with DeterminismAnalysisDetails

use of com.facebook.presto.verifier.event.DeterminismAnalysisDetails in project presto by prestodb.

the class LimitQueryDeterminismAnalyzer method analyzeLimitNoOrderBy.

private LimitQueryDeterminismAnalysis analyzeLimitNoOrderBy(Query newLimitQuery, long limit) {
    Query rowCountQuery = simpleQuery(new Select(false, ImmutableList.of(new SingleColumn(new FunctionCall(QualifiedName.of("count"), ImmutableList.of(new LongLiteral("1")))))), new TableSubquery(newLimitQuery));
    QueryResult<Long> result = callAndConsume(() -> prestoAction.execute(rowCountQuery, DETERMINISM_ANALYSIS_MAIN, resultSet -> Optional.of(resultSet.getLong(1))), stats -> stats.getQueryStats().map(QueryStats::getQueryId).ifPresent(determinismAnalysisDetails::setLimitQueryAnalysisQueryId));
    long rowCountHigherLimit = getOnlyElement(result.getResults());
    if (rowCountHigherLimit == rowCount) {
        return DETERMINISTIC;
    }
    if (rowCountHigherLimit > rowCount) {
        return NON_DETERMINISTIC;
    }
    return FAILED_DATA_CHANGED;
}
Also used : QualifiedName(com.facebook.presto.sql.tree.QualifiedName) NOT_RUN(com.facebook.presto.verifier.framework.LimitQueryDeterminismAnalysis.NOT_RUN) SingleColumn(com.facebook.presto.sql.tree.SingleColumn) ArrayList(java.util.ArrayList) VerifierUtil.callAndConsume(com.facebook.presto.verifier.framework.VerifierUtil.callAndConsume) Identifier(com.facebook.presto.sql.tree.Identifier) SQLException(java.sql.SQLException) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ImmutableList(com.google.common.collect.ImmutableList) ResultSet(java.sql.ResultSet) SelectItem(com.facebook.presto.sql.tree.SelectItem) Map(java.util.Map) Objects.requireNonNull(java.util.Objects.requireNonNull) QueryStats(com.facebook.presto.jdbc.QueryStats) TableSubquery(com.facebook.presto.sql.tree.TableSubquery) DETERMINISTIC(com.facebook.presto.verifier.framework.LimitQueryDeterminismAnalysis.DETERMINISTIC) ImmutableSet.toImmutableSet(com.google.common.collect.ImmutableSet.toImmutableSet) Math.toIntExact(java.lang.Math.toIntExact) NON_DETERMINISTIC(com.facebook.presto.verifier.framework.LimitQueryDeterminismAnalysis.NON_DETERMINISTIC) ENGLISH(java.util.Locale.ENGLISH) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) CreateTableAsSelect(com.facebook.presto.sql.tree.CreateTableAsSelect) OrderBy(com.facebook.presto.sql.tree.OrderBy) Query(com.facebook.presto.sql.tree.Query) QuerySpecification(com.facebook.presto.sql.tree.QuerySpecification) With(com.facebook.presto.sql.tree.With) Set(java.util.Set) VerifierUtil.getColumnIndices(com.facebook.presto.verifier.framework.VerifierUtil.getColumnIndices) Iterables.getOnlyElement(com.google.common.collect.Iterables.getOnlyElement) ResultSetConverter(com.facebook.presto.verifier.prestoaction.PrestoAction.ResultSetConverter) String.format(java.lang.String.format) Preconditions.checkState(com.google.common.base.Preconditions.checkState) Insert(com.facebook.presto.sql.tree.Insert) Objects(java.util.Objects) DeterminismAnalysisDetails(com.facebook.presto.verifier.event.DeterminismAnalysisDetails) List(java.util.List) Expression(com.facebook.presto.sql.tree.Expression) FAILED_DATA_CHANGED(com.facebook.presto.verifier.framework.LimitQueryDeterminismAnalysis.FAILED_DATA_CHANGED) FAILED_QUERY_FAILURE(com.facebook.presto.verifier.framework.LimitQueryDeterminismAnalysis.FAILED_QUERY_FAILURE) PrestoAction(com.facebook.presto.verifier.prestoaction.PrestoAction) LongLiteral(com.facebook.presto.sql.tree.LongLiteral) Optional(java.util.Optional) VerifierUtil.delimitedIdentifier(com.facebook.presto.verifier.framework.VerifierUtil.delimitedIdentifier) Select(com.facebook.presto.sql.tree.Select) Long.parseLong(java.lang.Long.parseLong) DETERMINISM_ANALYSIS_MAIN(com.facebook.presto.verifier.framework.QueryStage.DETERMINISM_ANALYSIS_MAIN) Statement(com.facebook.presto.sql.tree.Statement) QueryUtil.simpleQuery(com.facebook.presto.sql.QueryUtil.simpleQuery) Query(com.facebook.presto.sql.tree.Query) QueryUtil.simpleQuery(com.facebook.presto.sql.QueryUtil.simpleQuery) LongLiteral(com.facebook.presto.sql.tree.LongLiteral) QueryStats(com.facebook.presto.jdbc.QueryStats) CreateTableAsSelect(com.facebook.presto.sql.tree.CreateTableAsSelect) Select(com.facebook.presto.sql.tree.Select) Long.parseLong(java.lang.Long.parseLong) SingleColumn(com.facebook.presto.sql.tree.SingleColumn) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) TableSubquery(com.facebook.presto.sql.tree.TableSubquery)

Example 4 with DeterminismAnalysisDetails

use of com.facebook.presto.verifier.event.DeterminismAnalysisDetails in project presto by prestodb.

the class TestLimitQueryDeterminismAnalyzer method assertAnalysis.

private static void assertAnalysis(PrestoAction prestoAction, String query, long controlRowCount, LimitQueryDeterminismAnalysis expectedAnalysis, boolean queryRan) {
    DeterminismAnalysisDetails.Builder determinismAnalysisDetailsBuilder = DeterminismAnalysisDetails.builder();
    LimitQueryDeterminismAnalysis analysis = new LimitQueryDeterminismAnalyzer(prestoAction, true, sqlParser.createStatement(query, PARSING_OPTIONS), controlRowCount, determinismAnalysisDetailsBuilder).analyze();
    DeterminismAnalysisDetails determinismAnalysisDetails = determinismAnalysisDetailsBuilder.build(NON_DETERMINISTIC_LIMIT_CLAUSE);
    assertEquals(analysis, expectedAnalysis);
    assertEquals(determinismAnalysisDetails.getLimitQueryAnalysisQueryId() != null, queryRan);
}
Also used : DeterminismAnalysisDetails(com.facebook.presto.verifier.event.DeterminismAnalysisDetails)

Example 5 with DeterminismAnalysisDetails

use of com.facebook.presto.verifier.event.DeterminismAnalysisDetails in project presto by prestodb.

the class AbstractVerification method concludeVerification.

private VerificationResult concludeVerification(PartialVerificationResult partialResult, Optional<B> control, Optional<B> test, Optional<QueryResult<V>> controlQueryResult, Optional<QueryResult<V>> testQueryResult, QueryContext controlQueryContext, QueryContext testQueryContext, Optional<R> matchResult, ChecksumQueryContext controlChecksumQueryContext, ChecksumQueryContext testChecksumQueryContext, Optional<DeterminismAnalysisDetails> determinismAnalysisDetails, Optional<Throwable> throwable) {
    Optional<String> errorCode = Optional.empty();
    Optional<String> errorMessage = Optional.empty();
    if (partialResult.getStatus() != SUCCEEDED) {
        errorCode = Optional.ofNullable(throwable.map(t -> t instanceof QueryException ? ((QueryException) t).getErrorCodeName() : INTERNAL_ERROR).orElse(matchResult.map(MatchResult::getMatchTypeName).orElse(null)));
        errorMessage = Optional.of(constructErrorMessage(throwable, matchResult, controlQueryContext.getState(), testQueryContext.getState()));
    }
    VerifierQueryEvent event = new VerifierQueryEvent(sourceQuery.getSuite(), testId, sourceQuery.getName(), partialResult.getStatus(), matchResult.map(MatchResult::getMatchTypeName), partialResult.getSkippedReason(), determinismAnalysisDetails, partialResult.getResolveMessage(), skipControl ? Optional.empty() : Optional.of(buildQueryInfo(sourceQuery.getControlConfiguration(), sourceQuery.getQuery(CONTROL), controlChecksumQueryContext, control, controlQueryContext, controlQueryResult)), buildQueryInfo(sourceQuery.getTestConfiguration(), sourceQuery.getQuery(TEST), testChecksumQueryContext, test, testQueryContext, testQueryResult), errorCode, errorMessage, throwable.filter(QueryException.class::isInstance).map(QueryException.class::cast).map(QueryException::toQueryFailure), verificationContext.getQueryFailures(), verificationContext.getResubmissionCount());
    return new VerificationResult(this, false, Optional.of(event));
}
Also used : CONTROL_QUERY_TIMED_OUT(com.facebook.presto.verifier.framework.SkippedReason.CONTROL_QUERY_TIMED_OUT) NOT_RUN(com.facebook.presto.verifier.framework.QueryState.NOT_RUN) TIMED_OUT(com.facebook.presto.verifier.framework.QueryState.TIMED_OUT) TEST_MAIN(com.facebook.presto.verifier.framework.QueryStage.TEST_MAIN) Strings.nullToEmpty(com.google.common.base.Strings.nullToEmpty) QueryActions(com.facebook.presto.verifier.prestoaction.QueryActions) CONTROL_MAIN(com.facebook.presto.verifier.framework.QueryStage.CONTROL_MAIN) VERIFIER_INTERNAL_ERROR(com.facebook.presto.verifier.framework.SkippedReason.VERIFIER_INTERNAL_ERROR) FAILED_RESOLVED(com.facebook.presto.verifier.event.VerifierQueryEvent.EventStatus.FAILED_RESOLVED) VerifierUtil.callAndConsume(com.facebook.presto.verifier.framework.VerifierUtil.callAndConsume) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ImmutableList(com.google.common.collect.ImmutableList) FAILED_BEFORE_CONTROL_QUERY(com.facebook.presto.verifier.framework.SkippedReason.FAILED_BEFORE_CONTROL_QUERY) Objects.requireNonNull(java.util.Objects.requireNonNull) TEST_SETUP(com.facebook.presto.verifier.framework.QueryStage.TEST_SETUP) QueryStats(com.facebook.presto.jdbc.QueryStats) SUCCEEDED(com.facebook.presto.verifier.event.VerifierQueryEvent.EventStatus.SUCCEEDED) EXCEEDED_TIME_LIMIT(com.facebook.presto.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT) VerifierQueryEvent(com.facebook.presto.verifier.event.VerifierQueryEvent) CONTROL_SETUP_QUERY_FAILED(com.facebook.presto.verifier.framework.SkippedReason.CONTROL_SETUP_QUERY_FAILED) SqlFormatter(com.facebook.presto.sql.SqlFormatter) QueryInfo(com.facebook.presto.verifier.event.QueryInfo) DataVerificationUtil.teardownSafely(com.facebook.presto.verifier.framework.DataVerificationUtil.teardownSafely) QueryAction(com.facebook.presto.verifier.prestoaction.QueryAction) FAILED_TO_SETUP(com.facebook.presto.verifier.framework.QueryState.FAILED_TO_SETUP) QueryActionStats(com.facebook.presto.verifier.prestoaction.QueryActionStats) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) TEST(com.facebook.presto.verifier.framework.ClusterType.TEST) CONTROL(com.facebook.presto.verifier.framework.ClusterType.CONTROL) SKIPPED(com.facebook.presto.verifier.event.VerifierQueryEvent.EventStatus.SKIPPED) EventStatus(com.facebook.presto.verifier.event.VerifierQueryEvent.EventStatus) ResultSetConverter(com.facebook.presto.verifier.prestoaction.PrestoAction.ResultSetConverter) CONTROL_QUERY_FAILED(com.facebook.presto.verifier.framework.SkippedReason.CONTROL_QUERY_FAILED) String.format(java.lang.String.format) Preconditions.checkState(com.google.common.base.Preconditions.checkState) Throwables.getStackTraceAsString(com.google.common.base.Throwables.getStackTraceAsString) DeterminismAnalysisDetails(com.facebook.presto.verifier.event.DeterminismAnalysisDetails) SqlExceptionClassifier(com.facebook.presto.verifier.prestoaction.SqlExceptionClassifier) List(java.util.List) NON_DETERMINISTIC(com.facebook.presto.verifier.framework.SkippedReason.NON_DETERMINISTIC) VerifierUtil.runAndConsume(com.facebook.presto.verifier.framework.VerifierUtil.runAndConsume) PrestoAction(com.facebook.presto.verifier.prestoaction.PrestoAction) Optional(java.util.Optional) FAILED(com.facebook.presto.verifier.event.VerifierQueryEvent.EventStatus.FAILED) CONTROL_SETUP(com.facebook.presto.verifier.framework.QueryStage.CONTROL_SETUP) Statement(com.facebook.presto.sql.tree.Statement) VerifierQueryEvent(com.facebook.presto.verifier.event.VerifierQueryEvent) Throwables.getStackTraceAsString(com.google.common.base.Throwables.getStackTraceAsString)

Aggregations

DeterminismAnalysisDetails (com.facebook.presto.verifier.event.DeterminismAnalysisDetails)5 QueryStats (com.facebook.presto.jdbc.QueryStats)3 Statement (com.facebook.presto.sql.tree.Statement)3 VerifierUtil.callAndConsume (com.facebook.presto.verifier.framework.VerifierUtil.callAndConsume)3 PrestoAction (com.facebook.presto.verifier.prestoaction.PrestoAction)3 Query (com.facebook.presto.sql.tree.Query)2 CONTROL (com.facebook.presto.verifier.framework.ClusterType.CONTROL)2 DataVerificationUtil.teardownSafely (com.facebook.presto.verifier.framework.DataVerificationUtil.teardownSafely)2 DETERMINISM_ANALYSIS_MAIN (com.facebook.presto.verifier.framework.QueryStage.DETERMINISM_ANALYSIS_MAIN)2 Iterables.getOnlyElement (com.google.common.collect.Iterables.getOnlyElement)2 String.format (java.lang.String.format)2 List (java.util.List)2 Map (java.util.Map)2 Objects.requireNonNull (java.util.Objects.requireNonNull)2 Optional (java.util.Optional)2 Set (java.util.Set)2 TypeManager (com.facebook.presto.common.type.TypeManager)1 EXCEEDED_TIME_LIMIT (com.facebook.presto.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT)1 QueryUtil.simpleQuery (com.facebook.presto.sql.QueryUtil.simpleQuery)1 SqlFormatter (com.facebook.presto.sql.SqlFormatter)1