### 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)
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?
### 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?
### 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 inverseMatch aggregation stage
Currently it supports a spec like:
```
{ path: <path>, input: <doc or array of docs/path expression>, defaultResult: [optional | <bool> ]}
```
So if we want to fetch the input to the document query from an external collection, a lookup stage would need to be added prior to the inverseMatch.
The next stage of this feature is to support a spec like:
```
{ path: <path>, fromCollection: <coll>, pipelines: [$match/$project/$limit], defaultResult: [optional | <bool> ]}
```
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
OSS
### 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
Start bringing down the Public surface area with back compat for helio_api
Add inverse match UDF to 1.14 schema to be able to use it sooner in prod
This UDF will be used for the new $inverseMatch aggregation stage which will take the document to apply the match on, the path where the document defines the query and the input value to evaluate the query against.
Since we need a UDF to do this against every document in a query like so:
```
SELECT document FROM mongo_data.documents_1_102045 collection WHERE helio_api.bson_dollar_inverse_match(document,{ "path": "a", "input" : [ { "foo" : { "$numberInt" : "3" } } ] }'::mongo_catalog.bson)
```
This is schema dependent, let's add a no-op UDF so that we can use the 1.14 train and that way in the 1.15 branch it will be already available to be used by the binary since we ship schema n-1 always.
### Description
Move main to 1.15 binary and 1.14 schema and fix rename collection version
Rename collection PR went in after we forked the 1.14 release branch but before main was bumped to the new schema and binary version, so fix that in this PR as well.
### 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))
### Description
Issue:
Since the owner of scheduled cron job for index build background is admin user i.e. 'postgres' in prod, the CREATE INDEX CONCURRETLY queries are owned by 'postgres' user in pg_stat_activity.
And non-admin user who requests for currentOp to get progress of running indexes, does not have enough privilege to read queries owned by admin user in pg_stat_activity.
Solutions:
From inside running cron-job, create LibPQ connection as the non-admin user for CREATE INDEX CONCURRENTLY. The pre-requisite for this approach is that we have the information of user-oid who has submitted the request in queue. I.e. This needs user_name column in index_queue table.
Related work items: #2961369
### 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 (OSS)
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Today in OSS the query operator was evaluated at runtime - move this to expansion of hte operator at planning time using the simplify function.
### 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))
### Description
Move auth_scram functions to OSS
### 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))
### Description
Refactor some pgmongo references in OSS
### 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)
UDF
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
Move drop_database function to OSS
### 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
Updating version for 1.12 release