prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Catalog "%s" cannot be used as a partitioning provider: %s
What it means
AddExchanges delegates hash partitioning to a catalog's partitioning provider via getPartitioningHandleForExchange. If the provider catalog throws NOT_SUPPORTED (it cannot supply that partitioning), AddExchanges wraps it in a clearer NOT_SUPPORTED error naming the catalog.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddExchanges.java:1754
}
private Partitioning createPartitioning(Collection<VariableReferenceExpression> partitioningColumns)
{
// TODO: Use SystemTablesMetadata instead of introducing a special case
if (GlobalSystemConnector.NAME.equals(partitioningProviderCatalog)) {
return Partitioning.create(FIXED_HASH_DISTRIBUTION, ImmutableList.copyOf(partitioningColumns));
}
List<Type> partitioningTypes = partitioningColumns.stream()
.map(VariableReferenceExpression::getType)
.collect(toImmutableList());
try {
PartitioningHandle partitioningHandle = metadata.getPartitioningHandleForExchange(session, partitioningProviderCatalog, hashPartitionCount, partitioningTypes);
return Partitioning.create(partitioningHandle, partitioningColumns);
}
catch (PrestoException e) {
if (e.getErrorCode().equals(NOT_SUPPORTED.toErrorCode())) {
throw new PrestoException(
NOT_SUPPORTED,
format(
"Catalog \"%s\" cannot be used as a partitioning provider: %s",
partitioningProviderCatalog,
e.getMessage()),
e);
}
throw e;
}
}
// TODO: refactor this method into ExchangeNode#partitionedExchange once
// materialized exchange is supported for all nodes.
private Scope selectExchangeScopeForPartitionedRemoteExchange(PlanNode exchangeSource, boolean nullsAndAnyReplicated)
{
if (nullsAndAnyReplicated || exchangeSource.getOutputVariables().isEmpty()) {
// materialized remote exchange is not supported when
// * replicateNullsAndAny is neededView on GitHub (pinned to 55bb57d202)
Solutions
- Remove or fix the 'partitioning_provider_catalog' session property / connector config to point at a catalog supporting the partitioning
- Avoid cross-catalog joins that force partitioning through an unsupported connector, or co-locate data in one catalog
- Check the wrapped cause (e.getMessage()) for the connector-specific limitation and adjust partition count or types
Example fix
// before SET SESSION partitioning_provider_catalog = 'iceberg'; -- unsupported partitioning SELECT ... JOIN ...; // after RESET SESSION partitioning_provider_catalog; SELECT ... JOIN ...;
Defensive patterns
Strategy: validation
Validate before calling
// confirm connector supports exchange partitioning before cross-catalog joins SHOW SESSION LIKE 'partitioning_provider_catalog';
Type guard
null
Try / catch
try {
return query(sql);
} catch (PrestoException e) {
if (e.getErrorCode() == NOT_SUPPORTED.toErrorCode() && e.getMessage().contains("partitioning provider")) {
resetSessionProperty("partitioning_provider_catalog");
return retryQuery(sql);
}
throw e;
} Prevention
- Only set partitioning_provider_catalog to connectors that implement getPartitioningHandleForExchange
- Avoid cross-catalog joins requiring hash distribution through an unsupported connector
- Keep the wrapped cause message when triaging — it names the connector limitation
When it happens
Trigger: A query's join/aggregation distribution requires a partitioning handle from a connector catalog that does not support the requested partitioning type or partition count.
Common situations: Querying tables across catalogs where one connector lacks partitioning support; partitioning_provider_catalog misconfigured; hash partition count unsupported by the connector.
Understand the failure class
Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/ff7a6a69ead1c060.
Report an issue: GitHub.