{"record":{"id":"602f81c0da949d76","repo":"prestodb/presto","slug":"invalid-session-property-602f81","errorCode":"INVALID_SESSION_PROPERTY","errorMessage":"Invalid value for execution strategy [%s]. Valid values: %s","messagePattern":"Invalid value for execution strategy \\[(.+?)\\]\\. Valid values: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/ExecutionStrategyValidator.java","lineNumber":38,"sourceCode":"import java.util.Set;\nimport java.util.function.Consumer;\nimport java.util.stream.Collectors;\n\nimport static com.facebook.presto.spi.StandardErrorCode.INVALID_SESSION_PROPERTY;\nimport static java.lang.String.format;\n\npublic class ExecutionStrategyValidator\n        implements Consumer<String>\n{\n    private static final Set<String> validStrategies = Arrays.stream(ExecutionStrategy.values())\n            .map(strategy -> strategy.name())\n            .collect(Collectors.toSet());\n\n    @Override\n    public void accept(String strategy)\n    {\n        if (!validStrategies.contains(strategy)) {\n            throw new PrestoException(INVALID_SESSION_PROPERTY, format(\"Invalid value for execution strategy [%s]. Valid values: %s\", strategy, String.join(\",\", validStrategies)));\n        }\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":42,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/ExecutionStrategyValidator.java#L20-L42","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"-- before\nSET SESSION spark.execution_strategy = 'auto';\n-- after\nSET SESSION spark.execution_strategy = 'LARGE';","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"LARGE\", \"LARGE_EXECUTION\", \"ALL\"); // match deployment config\nif (!valid.contains(strategy)) throw new IllegalArgumentException(\n    \"Invalid execution strategy [\" + strategy + \"]. Valid values: \" + String.join(\",\", valid));","typeGuard":"boolean isValidExecutionStrategy(String s) {\n    return s != null && s.matches(\"LARGE|LARGE_EXECUTION|ALL\");\n}","tryCatchPattern":"try {\n    session.setProperty(\"spark_execution_strategy\", strategy);\n} catch (PrestoException e) {\n    if (\"INVALID_SESSION_PROPERTY\".equals(e.getErrorCode().getName())) {\n        LOG.warn(\"Falling back to default execution strategy\");\n    } else throw e;\n}","preventionTips":["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"],"tags":["presto-spark","session-property","validation"],"backgroundTag":"invalid-session-property","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}