prestodb/presto · error · PrestoException
INVALID_SESSION_PROPERTY
INVALID_SESSION_PROPERTY
Error message
Invalid value for execution strategy [%s]. Valid values: %s
What it means
PrestoSpark's ExecutionStrategyValidator validates the 'spark.execution-strategy' (execution strategy) session/config property via a TypeValidator. Any value not in the configured set of valid strategies (e.g. modified-time-based values such as LARGE, LARGE_EXECUTION, ALL) is rejected with INVALID_SESSION_PROPERTY, listing the accepted values.
Source
Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/ExecutionStrategyValidator.java:38
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import static com.facebook.presto.spi.StandardErrorCode.INVALID_SESSION_PROPERTY;
import static java.lang.String.format;
public class ExecutionStrategyValidator
implements Consumer<String>
{
private static final Set<String> validStrategies = Arrays.stream(ExecutionStrategy.values())
.map(strategy -> strategy.name())
.collect(Collectors.toSet());
@Override
public void accept(String strategy)
{
if (!validStrategies.contains(strategy)) {
throw new PrestoException(INVALID_SESSION_PROPERTY, format("Invalid value for execution strategy [%s]. Valid values: %s", strategy, String.join(",", validStrategies)));
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Use one of the values listed in the error message's 'Valid values' list
- Check the configured validStrategies (spark.execution-strategy.<name> config entries) to see which strategies your deployment registers
- Upgrade Presto Spark if you need a strategy not yet defined in your version
Example fix
-- before SET SESSION spark.execution_strategy = 'auto'; -- after SET SESSION spark.execution_strategy = 'LARGE';
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Set.of("LARGE", "LARGE_EXECUTION", "ALL"); // match deployment config
if (!valid.contains(strategy)) throw new IllegalArgumentException(
"Invalid execution strategy [" + strategy + "]. Valid values: " + String.join(",", valid)); Type guard
boolean isValidExecutionStrategy(String s) {
return s != null && s.matches("LARGE|LARGE_EXECUTION|ALL");
} Try / catch
try {
session.setProperty("spark_execution_strategy", strategy);
} catch (PrestoException e) {
if ("INVALID_SESSION_PROPERTY".equals(e.getErrorCode().getName())) {
LOG.warn("Falling back to default execution strategy");
} else throw e;
} Prevention
- Copy strategy values only from the error's 'Valid values' list
- Keep strategy names uppercase and match them to configured spark.execution-strategy entries
- Pin strategy constants in your submission tooling instead of free-form strings
- Check Presto Spark release notes when adding strategies
When it happens
Trigger: Setting the execution strategy session property or spark.execution-strategy configuration to a string that is not in the whitelist compiled into the validator, e.g. SET SESSION spark.execution_strategy = 'auto' or passing it in a Spark job's session properties.
Common situations: Typos or wrong casing in the strategy name; copying execution strategies from another Presto deployment; using a strategy added in a newer Presto Spark release than the one running.
Related errors
- INVALID_SESSION_PROPERTY
- INVALID_SESSION_PROPERTY
- INVALID_SESSION_PROPERTY
- INVALID_SESSION_PROPERTY
- Invalid value [%s]. Valid values: %s
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/602f81c0da949d76.
Report an issue: GitHub.