Add $polygon tests#192
Conversation
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
…verlaps Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (1215+0 LOC, 8 files); LLM: Adds new test cases for the $polygon geospatial specifier, expanding compatibility test coverage for an existing tracked feature. If a label is wrong, remove it manually and ping |
vic-tsang
left a comment
There was a problem hiding this comment.
Edge Cases:
- Point located exactly on a polygon vertex
- Point collinear with an edge but beyond the segment
- Point on a non-axis-aligned edge (e.g., midpoint of hypotenuse)
Errors:
$polygon: [[0,0,0],[1,1,1],[2,0,0]]| 3-element points — error or silently ignored?$polygon: [[], [], []]| Empty sub-arrays as points- Multiple shape specifiers in one $geoWithin
$polygon: [[0,0],[1,1],[NaN,NaN],[2,0]]| Error even if most points are valid[[-Inf, 0], [1,1], [2,0]]| Only positive Infinity tested
Others:
- embedded_doc_non_xy_keys | {"a":1, "b":2} — does it use first two fields as x/y? Behavior is non-obvious
= a test case with $not + $polygon
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Added missing cases, put the multiple specifiers test within the geoWithin suite, it did not have a matching case and the behaviour is not polygon specific. |
The PR adds the tests for the $polygon geospatial specifier, and one additional error case test for geoWithin generally
Issue: Ref #32