prestodb/presto · error · PrestoException
FUNCTION_IMPLEMENTATION_ERROR
FUNCTION_IMPLEMENTATION_ERROR
Error message
Unexpected group enum type %s
What it means
Internal invariant failure (FUNCTION_IMPLEMENTATION_ERROR) in ArrayAggregationStateFactory.createGroupedState: the configured grouped-state mode enum has a value outside the known NEW/LEGACY set, so no grouped state class can be constructed. This reflects a configuration/build inconsistency, not user input.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java:56
return new SingleArrayAggregationState(type);
}
@Override
public Class<? extends ArrayAggregationState> getSingleStateClass()
{
return SingleArrayAggregationState.class;
}
@Override
public ArrayAggregationState createGroupedState()
{
switch (mode) {
case NEW:
return new GroupArrayAggregationState(type);
case LEGACY:
return new LegacyArrayAggregationGroupState(type);
default:
throw new PrestoException(FUNCTION_IMPLEMENTATION_ERROR, format("Unexpected group enum type %s", mode));
}
}
@Override
public Class<? extends ArrayAggregationState> getGroupedStateClass()
{
switch (mode) {
case NEW:
return GroupArrayAggregationState.class;
case LEGACY:
return LegacyArrayAggregationGroupState.class;
default:
throw new PrestoException(FUNCTION_IMPLEMENTATION_ERROR, format("Unexpected group enum type %s", mode));
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the array-agg grouped-state configuration/property uses a supported mode value
- Use the default NEW mode unless legacy behavior is explicitly required
- Report as a bug if a documented enum value triggers this path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e224584f7cc9a093.
Report an issue: GitHub.