presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/aggregation/GeometryStateFactory.java/GroupedGeometryState/setGeometry
class GroupedGeometryState:        @Override
        public void setGeometry(OGCGeometry geometry)
        {
            OGCGeometry previousValue = this.geometries.get(groupId);
            size -= getGeometryMemorySize(previousValue);
            size += getGeometryMemorySize(geometry);
            this.geometries.set(groupId, geometry);
        }