presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/aggregation/GeometryUnionAgg.java/GeometryUnionAgg/input
class GeometryUnionAgg:    @InputFunction
    public static void input(@AggregationState GeometryState state, @SqlType(GEOMETRY_TYPE_NAME) Slice input)
    {
        OGCGeometry geometry = GeometrySerde.deserialize(input);
        if (state.getGeometry() == null) {
            state.setGeometry(geometry);
        }
        else if (!geometry.isEmpty()) {
            state.setGeometry(state.getGeometry().union(geometry));
        }
    }