Files
documentdb/pg_helio_api
Ujjwal Agrawal d340c1951b Merged PR 1304364: [Bugfix] False +ve when $centerSphere covers points but not the shape itself
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Fixes large buffer area bug where all the points of a shape are covered by the buffer area but the shape itself is not container, we were returning false positives in this case leading to failing geo_s2within_line_polygon_sphere.js.
With this we check for intersection with the compliment area in case the buffer area is greater than hemishpere of earth. If intersection is there that means the shape lies outside buffer area so we return false.

**Note:** this will also result in perf improvement for centerSphere radius greater than pi as in that case we just return true without any recheck.

Related work items: #2992082
2024-04-05 13:43:51 +03:00
..