prestodb/presto · error · PrestoException

INVALID_RETRY_EXECUTION_STRATEGY

INVALID_RETRY_EXECUTION_STRATEGY

Error message

Execution strategy not supported: 

What it means

Presto on Spark builds execution settings from the session's retry execution strategy. Only ATTEMPT and (via scaling) INCREASE_HASH_PARTITION_COUNT strategies are implemented; any other configured retry-execution-strategy value falls through the switch's default arm and is rejected with this INVALID_RETRY_EXECUTION_STRATEGY PrestoException.

Source

Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/util/PrestoSparkExecutionUtils.java:66

        for (ExecutionStrategy strategy : executionStrategies) {
            log.info(String.format("Applying execution strategy: %s. Query Id: %s", strategy.name(), session.getQueryId().getId()));
            switch (strategy) {
                case DISABLE_BROADCAST_JOIN:
                    prestoSessionProperties.put(JOIN_DISTRIBUTION_TYPE, FeaturesConfig.JoinDistributionType.PARTITIONED.name());
                    break;

                case INCREASE_CONTAINER_SIZE:
                    sparkConfigProperties.putAll(getOutOfMemoryRetrySparkConfigs(session));
                    prestoSessionProperties.putAll(getOutOfMemoryRetryPrestoSessionProperties(session));
                    break;

                case INCREASE_HASH_PARTITION_COUNT:
                    long updatedPartitionCount = Math.round(getHashPartitionCount(session) *
                            getHashPartitionCountScalingFactorOnOutOfMemory(session));
                    prestoSessionProperties.put(HASH_PARTITION_COUNT, Long.toString(updatedPartitionCount));
                    break;
                default:
                    throw new PrestoException(INVALID_RETRY_EXECUTION_STRATEGY, "Execution strategy not supported: " + executionStrategies);
            }
        }

        return new PrestoSparkExecutionSettings(sparkConfigProperties.build(), prestoSessionProperties.build());
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set retry-execution-strategy session/config property to ATTEMPT or INCREASE_HASH_PARTITION_COUNT
  2. Check for typos/case in the configured strategy value
  3. Consult the presto-spark documentation for supported retry strategies before reusing values from non-Spark deployments

Example fix

// before
SET SESSION retry_execution_strategy = PARTIAL_RESULTS;
// after
SET SESSION retry_execution_strategy = ATTEMPT;
Defensive patterns

Strategy: validation

Validate before calling

if (!strategy.equals("ATTEMPT") && !strategy.equals("INCREASE_HASH_PARTITION_COUNT")) { throw new IllegalArgumentException("Unsupported retry-execution-strategy: " + strategy); }

Try / catch

try { settings = PrestoSparkExecutionUtils.getExecutionSettings(session); } catch (PrestoException e) { if (e.getErrorCode().getCode() == ErrorType.USER_ERROR.toErrorCode().getCode()) { /* fix strategy config */ } throw e; }

Prevention

When it happens

Trigger: Setting session property retry-execution-strategy (query max-run-time/retry config) to a value other than ATTEMPT or INCREASE_HASH_PARTITION_COUNT when running queries on Presto over Spark via getExecutionSettings.

Common situations: Typos or unsupported values in coordinator/session config for presto-spark; copying session property values from vanilla Presto that are not supported by the Spark execution path; upgrading Presto while reusing an old strategy value.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/32bd388a1d8092d6. Report an issue: GitHub.