prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
%s
What it means
ValueStore.addAndGetPosition wraps NotSupportedException (raised by the underlying OpenBigArray/HashTable probing code when an operation is unsupported) into a PrestoException with code NOT_SUPPORTED. This means the value store hit a capability its implementation does not provide, e.g. a store size or key configuration outside the supported range.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/histogram/ValueStore.java:109
valuePointer = values.getPositionCount();
valueHashes.set(valuePointer, (int) valueHash);
type.appendTo(block, position, values);
buckets.set(bucketId, valuePointer);
return valuePointer;
}
else if (type.equalTo(block, position, values, valuePointer)) {
// value at position
return valuePointer;
}
else {
int probe = nextProbe(probeCount);
bucketId = nextBucketId(originalBucketId, mask, probe);
probeCount++;
}
}
catch (NotSupportedException e) {
throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);
}
}
}
private int getBucketId(long valueHash, int mask)
{
return (int) (valueHash & mask);
}
@VisibleForTesting
void rehash()
{
++rehashCount;
long newBucketCountLong = bucketCount * 2L;
if (newBucketCountLong > Integer.MAX_VALUE) {
throw new PrestoException(GENERIC_INSUFFICIENT_RESOURCES, "Size of hash table cannot exceed " + Integer.MAX_VALUE + " entries (" + newBucketCountLong + ")");View on GitHub (pinned to 55bb57d202)
Solutions
- Reduce input cardinality (pre-aggregate, bucket, or sample) so the value store stays within supported limits.
- Check which inner operation throws NotSupportedException (inspect the cause chain) and align usage with its documented limits.
- Use a different aggregation (e.g. approx_distinct, sketches) if exact per-value storage is required at this scale.
Defensive patterns
Strategy: try-catch
Try / catch
-- Wrap the risky aggregation in a fallback SELECT COALESCE((SELECT histogram(val) FROM t WHERE <bounded>), MAP()) AS h;
Prevention
- Keep per-aggregation value counts within documented limits.
- Inspect exception cause chains to identify the unsupported inner operation.
- Fall back to approximate aggregations for very high cardinality inputs.
When it happens
Trigger: Calling addAndGetPosition on ValueStore during histogram/min-max-n aggregation when the internal OpenBigHashTable raises NotSupportedException while probing/inserting a value hash into the bucket array.
Common situations: Aggregating extremely large cardinality values through histogram-type aggregations; configurations where the internal hash table cannot grow or allocate the needed capacity.
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
- GENERIC_INSUFFICIENT_RESOURCES
- NOT_SUPPORTED
- NOT_SUPPORTED
- GENERIC_INSUFFICIENT_RESOURCES
- INVALID_TABLE_PROPERTY
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/876038f57f3b78e6.
Report an issue: GitHub.