{"record":{"id":"3964d83daddc2ddc","repo":"prestodb/presto","slug":"grouped-execution-is-not-supported-in-presto-on-sp","errorCode":null,"errorMessage":"grouped execution is not supported in presto on spark","messagePattern":"grouped execution is not supported in presto on spark","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/node/PrestoSparkNodePartitioningManager.java","lineNumber":58,"sourceCode":"        super(new PrestoSparkNodeScheduler(), partitioningProviderManager, new NodeSelectionStats());\n    }\n\n    @Override\n    public PartitionFunction getPartitionFunction(Session session, PartitioningScheme partitioningScheme, List<Type> partitionChannelTypes)\n    {\n        return super.getPartitionFunction(session, partitioningScheme, partitionChannelTypes);\n    }\n\n    @Override\n    public List<ConnectorPartitionHandle> listPartitionHandles(Session session, PartitioningHandle partitioningHandle)\n    {\n        return super.listPartitionHandles(session, partitioningHandle);\n    }\n\n    @Override\n    public NodePartitionMap getNodePartitioningMap(Session session, PartitioningHandle partitioningHandle)\n    {\n        throw new UnsupportedOperationException(\"grouped execution is not supported in presto on spark\");\n    }\n\n    @Override\n    public BucketNodeMap getBucketNodeMap(Session session, PartitioningHandle partitioningHandle, boolean preferDynamic)\n    {\n        throw new UnsupportedOperationException(\"grouped execution is not supported in presto on spark\");\n    }\n}\n","sourceCodeStart":40,"sourceCodeEnd":67,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/node/PrestoSparkNodePartitioningManager.java#L40-L67","documentation":"Presto on Spark does not support grouped execution (stage grouped execution with dynamic bucketed node assignment). PrestoSparkNodePartitioningManager.getNodePartitioningMap unconditionally throws UnsupportedOperationException because computing per-node partition maps for grouped execution is not implemented on Spark.","triggerScenarios":"A session with grouped execution enabled (e.g. query.node-partitioning or stage grouped execution plan property) causes the planner/scheduler to request a node partitioning map for a partitioning handle via getNodePartitioningMap.","commonSituations":"Session property grouped-execution-for-eligible-queries or node partitioning settings enabled on a Presto-on-Spark cluster; queries copied from a Presto-on-Hive cluster that relied on grouped execution.","solutions":["Disable grouped execution in the session (set grouped-execution / node-partitioning related session properties off)","Remove query.node-partitioning or similar connector table properties that force bucketed node partitioning","Update the query so it does not rely on grouped execution features when running on Spark"],"exampleFix":"// before\nSET SESSION grouped_execution_for_eligible_queries = true;\n// after\nSET SESSION grouped_execution_for_eligible_queries = false; -- grouped execution unsupported on Spark","handlingStrategy":"validation","validationCode":"if (session.getSystemProperty(\"grouped_execution_for_eligible_queries\").equals(\"true\")) {\n    throw new PrestoException(NOT_SUPPORTED, \"disable grouped execution on Spark\");\n}","typeGuard":null,"tryCatchPattern":"try { planFragmenter.fragment(...) } catch (UnsupportedOperationException e) { if (e.getMessage().contains(\"grouped execution\")) { log.error(\"grouped execution must be disabled\", e); } throw e; }","preventionTips":["Keep grouped-execution session properties off in Spark deployment defaults","Do not set query.node-partitioning on Spark-backed catalogs","Audit queries ported from Hive-native Presto for grouped execution reliance"],"tags":["presto-on-spark","grouped-execution","unsupported-operation","session-property"],"backgroundTag":"grouped-execution-unsupported","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}