prestodb/presto · error · UnsupportedOperationException
grouped execution is not supported in presto on spark
Error message
grouped execution is not supported in presto on spark
What it means
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.
Source
Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/node/PrestoSparkNodePartitioningManager.java:58
super(new PrestoSparkNodeScheduler(), partitioningProviderManager, new NodeSelectionStats());
}
@Override
public PartitionFunction getPartitionFunction(Session session, PartitioningScheme partitioningScheme, List<Type> partitionChannelTypes)
{
return super.getPartitionFunction(session, partitioningScheme, partitionChannelTypes);
}
@Override
public List<ConnectorPartitionHandle> listPartitionHandles(Session session, PartitioningHandle partitioningHandle)
{
return super.listPartitionHandles(session, partitioningHandle);
}
@Override
public NodePartitionMap getNodePartitioningMap(Session session, PartitioningHandle partitioningHandle)
{
throw new UnsupportedOperationException("grouped execution is not supported in presto on spark");
}
@Override
public BucketNodeMap getBucketNodeMap(Session session, PartitioningHandle partitioningHandle, boolean preferDynamic)
{
throw new UnsupportedOperationException("grouped execution is not supported in presto on spark");
}
}
View on GitHub (pinned to 55bb57d202)
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
Example fix
// before SET SESSION grouped_execution_for_eligible_queries = true; // after SET SESSION grouped_execution_for_eligible_queries = false; -- grouped execution unsupported on Spark
Defensive patterns
Strategy: validation
Validate before calling
if (session.getSystemProperty("grouped_execution_for_eligible_queries").equals("true")) {
throw new PrestoException(NOT_SUPPORTED, "disable grouped execution on Spark");
} Try / catch
try { planFragmenter.fragment(...) } catch (UnsupportedOperationException e) { if (e.getMessage().contains("grouped execution")) { log.error("grouped execution must be disabled", e); } throw e; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- partition-aware grouped execution requires an implementation
- Coordinator only fragment execution is not supported by nati
- materialized execution is not supported by the presto on spa
- SingleMapBlock does not support appendNull()
- SingleRowBlock does not support appendNull()
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/3964d83daddc2ddc.
Report an issue: GitHub.