prestodb/presto · error · PrestoException
INVALID_FUNCTION_ARGUMENT
INVALID_FUNCTION_ARGUMENT
Error message
%s only applies to %s. Input type is: %s
What it means
Input-type validation in ConvexHullAggregation.validateType: the geometry passed to the aggregation function has an Esri geometry type outside the set the function accepts, so it refuses to process it. The message names the function, the accepted types, and the offending input type.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/geospatial/aggregation/ConvexHullAggregation.java:92
}
}
@OutputFunction(GEOMETRY_TYPE_NAME)
public static void output(@AggregationState GeometryState state, BlockBuilder out)
{
if (state.getGeometry() == null) {
out.appendNull();
}
else {
GEOMETRY.writeSlice(out, EsriGeometrySerde.serialize(state.getGeometry()));
}
}
private static void validateType(String function, OGCGeometry geometry, Set<GeometryType> validTypes)
{
GeometryType type = GeometryType.getForEsriGeometryType(geometry.geometryType());
if (!validTypes.contains(type)) {
throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format("%s only applies to %s. Input type is: %s", function, OR_JOINER.join(validTypes), type));
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Filter inputs with ST_GeometryType to keep only supported geometry kinds
- Convert geometries to a supported type (e.g. apply ST_Envelope or ST_Points as appropriate) before aggregating
- Check the function's documentation for exactly which geometry types it accepts
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/geospatial/aggregation/ConvexHullAggregation.java:92 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/94e0a5ef7e2d3abb.
Report an issue: GitHub.