Closed juanignaciosl closed 6 years ago
This is caused by the change in the behavior of =
operator in 2.4: "3844, Make = operator a strict equality test". Until 2.4, it compared equality of bounding boxes. There were tests abusing from that at checks:
In the future, we should improve the test data so we can use strict equality. Meanwhile, as a fast way to transition to PostgreSQL 10, we could change the check to the old behavior:
SELECT st_envelope(cdb_observatory.OBS_GetBoundary(
cdb_observatory._TestPoint(),
'us.census.tiger.census_tract'
)) = st_envelope(st_asewkb(:'cartodb_census_tract_geometry')) As OBS_GetBoundary_cartodb_census_tract;
@pramsey what do you think about this workaround?
cc @ethervoid
That workaround should be fine. Envelopes always start/end at the same place. One possible issue? Is that the = operator checked the equality of the float4 bounds, not the float8 bounds, so it's possible that you might still have objects that show up as having envelope != envelope even though they previously tested true using =.
Tests passed, so it should be fine 👍 For future testing we should probably use exact geometries and ST_Equals
.
Tests are failing in PG10: https://travis-ci.org/CartoDB/observatory-extension/jobs/362144496