Add $geometry tests#220
Conversation
Signed-off-by: PatersonProjects <[email protected]>
…rity, removed out of scope cases Signed-off-by: PatersonProjects <[email protected]>
Signed-off-by: PatersonProjects <[email protected]>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (1363+0 LOC, 7 files); LLM: Adds new compatibility test coverage for the $geometry geospatial specifier, expanding test-coverage under documentdb_tests/compatibility/tests. If a label is wrong, remove it manually and ping |
Signed-off-by: PatersonProjects <[email protected]>
Signed-off-by: PatersonProjects <[email protected]>
| CCW_POLYGON = [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]] | ||
|
|
||
|
|
||
| INVALID_GEOMETRY_TESTS: list[QueryTestCase] = [ |
There was a problem hiding this comment.
Note: PR #218 ($near) has a test missing_type_defaults_to_point that asserts $geometry without type succeeds (defaults to Point) when used with $near. This test asserts it errors with $geoIntersects. Both pass against MongoDB, so the behavior differs by parent operator. Consider adding a brief comment here noting this is $geoIntersects-specific — $near allows missing type.
There was a problem hiding this comment.
Good catch, I think we're better off removing the case since there will be a test added in geoIntersects looking at #232, it being here leads one to think that's geometry behaviour when it's not.
There was a problem hiding this comment.
Removed test case
Signed-off-by: PatersonProjects <[email protected]>
eerxuan
left a comment
There was a problem hiding this comment.
Most of the test cases are testing $geometry's container like $geoWithin or $geoIntersects. Those are duplication. This folder should focus on $geometry input validation and GeoJson types. Just use one container in command ($geoIntersects"), don't use others.
This PR adds the compatibility test for the $geometry geospatial specifier
Ref: Issue #32