### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Related work items: #3116418, #3244312
### Does this PR have any customer impact?
Yes.
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### 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
support for $vectorSearch in aggregation pipeline.
### Does this PR have any customer impact?
By default, no. Not unless they choose to use the read only role.
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
New Feature
### Description
Adding a readonly role in the backend. The goal is to enable native readonly users in Mongo VCore
Related work items: #3141137, #3158558
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
Added support for $geoNear aggregation stage pipeline.
### Description
Part 2 for supporting geoNear stage
This fixes following TODOs from the last PR:
1. Push `$minDistance` and `$maxDistance` to index similar to mongo. ✅
=================
Created a new range distance query operator `@|><|` which is supported by both `2d` and `2dsphere` indexes. $geoNear now uses this instead of float8 distance less than / greater than comparisions.
1. [TODO] Make the stage require an index always. ❌
=================
$geoNear queries always require a geo index in mongo
1. Fix projection for nested array fields. ✅
=================
$geoNear projection for `distanceField` or `includeLocs` overrides the intermediate array nodes instead of recursing into arrays and updating each element.
1. Make common test setup for running $geoNear queries in JSTests which don't require key in mongo. ✅
=================
Mongo JSTests mostly create single geo index on the collection and misses the `key` option for $geoNear stage, so we override couple of mongo functions to make sure if we are using the $geoNear stage then we can update the pipeline to contain the respective `key` field, so that tests can run without failure.
1. More testing and validations with other stages that can use $geoNear. ✅
1. Test batching and cursor support. ✅
1. Overall testing and validations ✅
1. $geoNear Tests passed: **Out of 23 test dependent on $geonear now 9 are passing**, and rest are again dependednt on $near and $nearSphere which is a subset of $geonear
Related work items: #2782870, #2782872
### 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)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
- SingleBatch cursors with streaming cursors still had the custom scans and overhead
- Primary key lookup with custom streaming scans had the issue of potentially picking SeqScan due to costs changing after converting index scan -> bitmap scan.
Fix both these scenarios.
Support adding EXPLAIN with cursors to track these easier with tests.
### 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)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Push the $lookup fix into the 1.16 schema hotfix train
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
fixing bug for $replaceAll.
When we try to replace this
t.aggregate([{$project: {replacedText: { $replaceAll: { input: "foo bar", find: "o", replacement: "O" } }}}])
{ "_id" : ObjectId("6654594ae0e0158ce47550f6"), "replacedText" : "fOobar" }
Output should be
{ "_id" : ObjectId("6654594ae0e0158ce47550f6"), "replacedText" : "fOObar" }
Related work items: #3220469
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Allow the $lookup changes to happen in 1.17-1
### 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)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Fix scenarios where the documents may have $prefixed nested fields.
When doing lookup this was treated as an operator instead of a field throwing an error
Introduce a bson_dollar_merge_documents which ignores operators and simply merges the documents directly.
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
This PR adds support for `$let` aggregation operator, it also includes some bugfixes around variables at variable name validation and reverts flowing the variable context at parse time since there was a way to do it without flowing it.
Split in 2 commits to make easier reviewing, one for $let support and the other one to revert flowing the variable context at parse time.
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Perf
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
1) When Skip: 0 & Limit: 0 this means that skip and limit are unset. We did this correctly, but that case is streamable as a cursor. We treat this as a persistent cursor leading to connection usage being less optimal. This fixes that to make skip/limit being streamable
2) Log extension versions every hour so that we can track this in Flex
3) For Bitmap scans with compare partial we use a tuplestore and store the Tids for the matching entries. While this is good, a TidBitmap is more efficient in storing TIDs. a tuple store stores it as (Block, Offset), (Block, Offset) ....
vs TIDBitmap stores it as (Block, Offset; Offset;Offset;Offset) (Block, Offset;Offset;) which is more efficient but also makes it lossy to preserve memory. In cases where the size fits in memory (under ~65K pages touched) this performs better than a tuplesort. After that, it still performs better if the intersection of the terms is small. Switch to this mode for tidbitmap where the bitmap is already lossy.
For certain bitmap scans, this brought the runtime from 1.2s to ~280ms.
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Perf/Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
For unsharded collections we create 32 connections per table for create indexes and only 1 of them does any work: Use sequential access to better utilize connections.
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
DevOps
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Enable installation of Mongo C driver for containers
Related work items: #3141377
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
DevOps
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
No
### Description
Bumping schema version for 1.17 release
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Make variables part of aggregation expression data and support expressions as the variable value. Also this flows the variable context through projection tree which is needed to support lookup let and also let on update and find (top level let).
Once this is in, next PR will be to support the $let aggregation operator, which will set the variable context at parse time for it's child expressions.
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
This pr aims to support $dateFromString operator.
Since this has multiple parts and complexity to it this part of the pr will take care of handling all the input strings and parsing them with the given input format and incase format is not specified we use for now Default format to parse the dateString. If not parseable we throw error.
In next set of pr we will aim to parse the string when format is not specified with even more format checks
Related work items: #2019204
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
$sortArray (aggregation) operator
Related work items: #2019138
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Are you introducing any new config? If yes, do you have tests with and without them being set?
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Fixing a bug for dateTrunc startOfweek handling and adding more sql tests
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
No
### Description
Add support for $maxN/ $minN aggregation array operator.
Related work items: #2019119, #2019127
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Add array operator: $zip
Related work items: #2019134
### Does this PR have any customer impact?
No. It does not have any customer impact, since the UDF is not exposed to users in this PR.
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature. It introduces infrastructure and an UDF for implementing Change Streams.
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Change Stream Aggergation stage UDF(change_stream_aggregation) has been added in this PR.
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
The release notes for this feature is available here:
docs/pgmongo/design_docs/data_plane/change_streams/change_stream_release_notes.md
### Description
### Description
This PR implements the change stream aggregation UDF `change_stream_aggregation`
It adds some unit tests for testing change stream.
# Supported Features
Currently, the $changeStream aggregation supports only these features:
1) Watching a collection for the following change events:
a) INSERT
b) UPDATE:
NOTE: UPDATe event always provides the new document after update.
The update_description field is not supported yet.
c) DELETE
2) Resuming the change stream from a particular event using the "_id" field in the change event
or the "postBatchResumeToken" field in the change stream cursor.
# Current Limitations:
1) The following events are not supported:
a) create
b) createIndexes
c) drop
d) dropDatabase
e) dropIndexes
f) invalidate
g) refineCollectionShardKey
h) rename
i) replace: NOTE: this event is published as "UPDATE" currently.
j) reshardCollection
k) shardCollection
NOTE: Expanded Events:
The above list includes expanded events also. The option "showExpandedEvents" is not supported.
2) Unsupported change stream pipeline options:
All the options other than "resumeAfter" is not currently supported, and will result in an error.
NOTE: Hisstorical change stream events are not supported "startAtOperationTime"
So change streams can be created from the current time only.
3) Change Stream targets:
Currently, $changestream aggregation can be applied at collection level only. Not at the database/cluster level. But Multiple change streams can be opened on multiple collections.
But the current default maximum limit on parallel change streams by default is "5".
4) Support for multi node clusters.
Change Streams are supported only at the single node clusters.
### 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
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
- Fix Lookup error with _id performance fix
- if lookup had a $sort/$group as an inner pipeline, then this would return a function not found error
- Attempt to fix spurious column needs to be in group by to be used in aggregate
- Attempt to fix $collStats errors with Cache Lookup Failed
- Unable to repro but the error kicks in on template tuple_desc creation so ensure that the values are correct (they were incorrectly constructed). Not sure why this pops up now.
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix + Perf
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
This covers a few issues uncovered in customer investigations:
1) Explain doesn't show the new $not operators and instead uses $unknown
2) For streaming cursors we can't support parallel scans since that could reorder the tuples and make us miss results. If we have a streaming cursors - remove the parallel plan altogether
3) For non-streaming cursors, always prefer index paths over parallel seqscans - this is because our statistics aren't great and on large docs (esp with LIMIT) the selectivity makes the planner think a parallel path can be faster. We can re-evaluate this with statistics later
4) For non-streaming cursors with LIMIT, allow index scans instead of bitmap scans with a GUC. This also needs to be paired with the RUM enable_semifast_gettuple - this is behind a GUC to allow for validation of correctness. Outside of LIMIT scenarios do not allow this yet.
Note: This is not yet enabled for TTL purger since we want to improve that case with an improvement inside amgettuple first.
### 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
### Are you introducing any new config? If yes, do you have tests with and without them being set?No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
SeqScan paths aren't deterministic with large collections and caching. With Buffer caching, seqscans start in the middle and wrap around and change arbitrarily with every seqscan call.
Our cursor implementation assumes increasing order of TIDs.
Convert SeqScan to a TIDRangeScan with initial scan being >= (0,0) and subsequent calls with >= ContinuationTOken.
This also allows for us to more efficiently skip pages on getmore calls making the overall calls faster.
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Perf
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Prep the sql changes for hotfixing into 1.14-6
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
DevOps
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
No
### Description
Commit 7e3533e6: Bumping schema for 1.17 release
### 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
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Don't let citus.max_client_connections affect LibPQ connections by marking these connections as internal
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bug
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
N/A
### Are you introducing any new config? If yes, do you have tests with and without them being set?
N/A
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
This is a minor bug in our code that we caught during writing some release validation specs. Existing and request indexes were flipped.
### Does this PR have any customer impact?
May be.
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Mongo allows only one text index. We also allowed once. But when someone created the second index, we said that an equivalent index exists instead of saying one can't create more than one text index.
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
Adds index pushdown for $not operators
### Description
Adds index pushdown for $not operators
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Implement statistics for bson Dollar functions behind a feature flag. This uses the default Postgres operator statistics using Most Common Value and Histogram stats if available to compute.
As a fallback it also uses operator data to provide default values if needed.
Sets up an ANALYZE function on bson so that this can be improved (since the ANALYZE is not there yet). This will be done in a subsequent change.
### Does this PR have any customer impact?
No (Behind a feature flag)
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Improve perf for single node - go for the shard directly if it’s available improving single node perf.
For perf results we see
YCSB Read: 8000 reads/sec. (Up from 6300)
YCSB Update: 1745 ops/sec ( from 1550)
YCSB Insert: 1760 ops/sec (from 1550)
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactor
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Delete the non-fast scan code since the faster scan code has been made default everywhere. Also remove some of the old CLusterVersionisAtleast() paths
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
1. Reduce default value of cron job schedule to 2 seconds for Index Build background feature.
Though, the Index Build background feature is behind GUC (disabled by-default)
2. Disable cron job for upgrade test, we have seen flakiness in the test
3. DropIndexes should be able to cancel CreateIndexes as right owner so that execution of DROP INDEX CONCURRENTLY is cleaner and it does not conflict with CREATE INDEX CONCURRENTLY
Sample serverside logs for 3rd point
```
2024-04-16 16:54:34.990 UTC [40693] LOG: Cancel existing index build request for 6 is completed.
2024-04-16 16:54:34.990 UTC [40693] STATEMENT: CALL mongo_api_v1.drop_indexes_concurrently($1, $2)
**2024-04-16 16:54:34.991 UTC [40704] WARNING: CONCURRENTLY-enabled index commands can fail partially, leaving behind an INVALID index.
Use DROP INDEX CONCURRENTLY IF EXISTS to remove the invalid index.
2024-04-16 16:54:34.991 UTC [40704] ERROR: canceling statement due to user request
2024-04-16 16:54:34.991 UTC [40704] HINT: canceling statement due to user request
2024-04-16 16:54:34.991 UTC [40704] STATEMENT: CREATE INDEX CONCURRENTLY documents_rum_index_6 ON mongo_data.documents_1 USING pgmongo_rum ( document mongo_catalog.bson_rum_single_path_ops(path='_id'), document mongo_catalog.bson_rum_single_path_ops(path='vendorItemId'))
2024-04-16 16:54:34.991 UTC [40705] ERROR: canceling statement due to user request
2024-04-16 16:54:34.991 UTC [40705] HINT: canceling statement due to user request**
2024-04-16 16:54:34.991 UTC [40705] STATEMENT: CREATE INDEX CONCURRENTLY documents_rum_index_6_102045 ON mongo_data.documents_1_102045 USING pgmongo_rum (document mongo_catalog.bson_rum_single_path_ops (path = '_id' ) ,document mongo_catalog.bson_rum_single_path_ops (path = 'vendorItemId' ) )
Related work items: #3109561
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
CURRENT is a system variable that points to ROOT (current document) unless it is overridden, if it is overridden, path expressions should point to that value rather than ROOT, which means "$a" is equivalent to "$$CURRENT.a".
This PR changes path expressions to be `CURRENT.path` rather than just `path`.
This hasn't been a problem since we don't support $let yet, however, now that we're adding expressions that can define variables, like `$map` this showed up on JS Tests.
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
add jstest for self intersecting polygons
Related work items: #2894103
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Related work items: #2019195
### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactor/Hotfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Prep the schema for a $lookup perf hotfix.
### Does this PR have any customer impact?
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Lookup Index pushdown: Allow index pushdown of lookup queries for both left and right queries.
For _id joins, push to the B-tree index and use the object_id column.
For RUM indexes, introduce a new function and support that allows pushing to the index based on the specified path rather than the document itself.
This caused a customer $lookup query to go from taking 45+ mins and timing out to finishing in under 3 mins
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
Support $geoNear aggregation stage
### Description
Add the design doc and necessary operators and functions needed for $geoNear
Also,
1- Implement the $geoNear aggregation stage skeleton and support all options.
- `distanceField`,
- `near` (both legacy, geojson point)
-`includeLocs`,
-`minDistance` & `maxDistance`
- `distanceMultiplier`
- `key`
2- Support index pushdown of the stage to `2d` and `2dspher` index.
- spherical / non-spherical distance support for `2d` index.
- spherical distance support for `2dsphere` index
Things still a TODO.
1- ~~Update the mongo explain plans for geonear stage~~.
2- Make the stage require an index always, currently it can be executed without index too.
3- Fix projection for nested array fields.
4- Make common test setup for running $geoNear queries in JSTests which don't require key in mongo.
5- More testing and validations with other stages that can use $geoNear.
6- Test batching and cursor support.
7- Overall testing and validations
Related work items: #3000189, #3065270
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
1.16
### Description
Use st_dwithin and st_expand for $center
Related work items: #2894556