Commit Graph
123 Commits
Author SHA1 Message Date
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
Shuai Tian 🚀 fa33a920c7 Merged PR 1310426: add timestamp operator: $tsSecond, $tsIncrement
### 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
add timestamp operator $tsSecond, $tsIncrement

Related work items: #3027168, #3027169, #3027170
2024-04-05 13:43:51 +03:00
Ayush Saluja 1a9dcdd00b Merged PR 1277272: $dateTrunc aggregation operator support
### 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
adding support for $dateTrunc mongo operator

Related work items: #2019212
2024-04-05 13:43:51 +03:00
Murat Tuncer daad5667f1 Update issue templates 2024-04-05 10:13:17 +03:00
Murat Tuncer 1b808ac66c Update issue templates 2024-04-05 09:54:10 +03:00
Deepak Bisht fb2ad03743 Merged PR 1278872: [Pgmongo][Geospatial]: Fix orientaion of polygons, and enhance multi* multi* geowithin match checks
### Does this PR have any customer impact?
No

### 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

This PR addresses compatibility issues between $geoWithin and ST_Covers. It aims to fix some issues and outline others that are not easily resolved at the moment.

**Issue 1**: PostGIS uses a clockwise orientation rule for polygons, where exterior rings should be oriented clockwise and hole rings should be oriented counterclockwise. This is different from the GeoJSON standard specification, which is the opposite. Therefore, we need to ensure that all our polygons follow a clockwise orientation to be modeled correctly.

Few referrence where the difference is mention:
1- https://gis.stackexchange.com/questions/306567/postgis-geojson-query-not-validating#comment496061_306571
2- https://dev.to/rodreegez/geojson-right-hand-rule-2idk

**Solution**: This PR fixes the issue by forcing polygons to follow a clockwise orientation. This resolves some cases where a polygon sharing a boundary point is considered a match in ST_Covers. Without this fix, the same polygon or any shape sharing a boundary point would not be considered a match.

**Issue 2**: For a Multi*/Multi* GeoJSON type coverage, PostGIS expects a single component to cover all the components of the other GeoJSON, which is not the behavior in Mongo.

**Solution**: This PR fixes the issue by reading individual components from Multi*/GeometryCollection GeoJSON types and calling ST_Covers for each one individually. If all components are covered by the query, it is considered a match.

**Issue 3**: The coverage of polygons with holes is faulty in PostGIS, and there is no workaround for this issue. These limitations are documented and should throw not supported error for now until we fix this in pgmongo layer.

Mongo DB also has some undefined behaviors as they don't guarantee degeneracy https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/#degenerate-geometry, where the polygon doesn't guarantee to contain another polygon sharing its boundaries.

Also along with this PR the wkb iterator now follows a visitor patter in order to be reusable for other scenarios as well e.g. wkb traversing logic of $centerSphere is now also used for multi multi geowithin checks

Related work items: #2958169
2024-03-29 10:49:37 +03:00
Santiago Fernandez Madero 2ad7381f79 Merged PR 1291973: Add inverseMatch aggregation stage
### 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> ]}
```
2024-03-29 10:49:37 +03:00
Lucas Borges Fernandes 5fdd275289 Merged PR 1252995: complete_upgrade UDF in C and initialize_cluster version check
This PR adds:

* complete_upgrade UDF in C;
* initialize_cluster version check
2024-03-29 10:49:37 +03:00
Vinod Sridharan 1f8b17e477 Merged PR 1311551: [Part 1: API] Reduce OSS Public API surface
### 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
2024-03-29 10:49:37 +03:00
Vinod Sridharan 89cda831f3 Merged PR 1311211: Fix for _id performance bug
### 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

Fix  for _id performance bug
2024-03-29 10:49:37 +03:00
Murat Tuncer 9884bd65e2 Merged PR 1309392: Fix pg_version differences in OSS
### Does this PR have any customer impact?
No

### 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
We defaulted to PG16, but some parts were still left as 15.
2024-03-29 10:49:37 +03:00
Vinod Sridharan c7a6019d5a Merged PR 1310170: Enable public api contract checks for Helio
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Test
### 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
Adds a test showing the public api surface of Helio. Any changes to this will update the test output and allows us to see (roughly) what the exports are.

These can then be trimmed as part of the OSS effort.
2024-03-29 10:49:37 +03:00
Vinod Sridharan 905875b98a Merged PR 1309930: Fix bug in FirstN/LastN
### 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))
N/A
### Description
Fixes bug in query generation for FirstN/LastN as reported by FerretDB.
2024-03-29 10:49:37 +03:00
Vinod Sridharan 14827ac3f9 Merged PR 1307723: [Colocation: Part 1] Support basic colocation of tables
### 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))
N/A
### Description
- Add support for colocating tables in Postgres using the citus colocation mechanisms.
- Add support for modifying colocation with collMod
- Add support for querying shardCount and colocationId of tables in Mongo

Do this in a way that extends Helio using hooks.
2024-03-29 10:49:37 +03:00
Abhishek Johri 623e22b9c5 Merged PR 1306867: Flaky test fix in $currentDate update op
### Does this PR have any customer impact?
No
### 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

Flaky test fix for $currentDate update op.
The currentDate related test in `bson_update_document_tests.sql` is flaly.
The test is taking a begin timestamp, then doing the update with $currentDate, then taking an end timestamp after the update, and expecting that the updated timestamp should be between the begin and end timestamps. But in the flaky case, it wasn't.

The error log:
`Updated timestamp "a" : 1710989509000 should be between 1710989507998 and 1710989508001`

Notice the updated timestamp for field "a" is exactly 1 second more than the begin/end timestamp.
It looks like, it was happening due to a rounding issue at the edge case (and which is why its flaky).
2024-03-29 10:49:37 +03:00
Aybuke Akgul 2b239d5a3b Merged PR 1305680: [OSS] Remove msdata references
### 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
Remove msdata references from OSS

[OSS] Remove msdata references
2024-03-29 10:49:37 +03:00
Vinod Sridharan e5f48bfdbe Merged PR 1307049: Fix Bug in BsonTree for MergeObjects
### 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

Fix Bug
2024-03-29 10:49:37 +03:00
Aybuke Akgul 318e2c6131 Merged PR 1306940: [OSS] Use PG16 in dev container
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Dev environment

### 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
Use PG16 in dev container
2024-03-29 10:49:37 +03:00
Aybuke Akgul 5be35b9443 Merged PR 1304019: [OSS] Modify update comment response
### 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
Change "ok" message type from int to double, to simulate MongoDB response.

[OSS] Modify update comment response
2024-03-29 10:49:37 +03:00
Mehmet Yilmaz 71f93a8297 Merged PR 1304245: Modify count command response
### 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
MongoDB responds with `"ok": float64(1)`, and Helio responds with `"ok": int32(1)}`. This PR modify count command response to simulate MongoDB response.
2024-03-22 17:07:00 +03:00
Murat Tuncer 2af9ef03f7 Merged PR 1304003: Fix debian 12 build error
### Does this PR have any customer impact?
No

### 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
building the project under debian 12 failed with dangling pointer warning. and error  existing memory usage
optimization was using compiler dependent feature that should be removed.
2024-03-22 17:07:00 +03:00
Tanvi Bhandari f8246af4fa Merged PR 1306499: Minor log fix in Create Index flow
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Log fix

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
NA

### Description
1. Turn-off all cron statements prior to execution.
2. Minor log fix.
2024-03-22 17:07:00 +03:00
Mehmet Yilmaz e316a5e920 Merged PR 1299087: Modify delete command response
### 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
The delete command, MongoDB responds with `{"n": int32(1), "ok": float64(1)}`, and Helio responds with `{"ok": int32(1), "n": int32(1)}`. This PR modify delete command response to simulate MongoDB response.
2024-03-22 11:28:50 +03:00
Vinod Sridharan 511938878d Merged PR 1304665: [Helio] Ignore $clusterTime in common spec fields
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bufix
### 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
Per reports for Helio, remove $clusterTime as a field ignored by Helio.
2024-03-22 11:28:50 +03:00
Vinod Sridharan 90c32193ae Merged PR 1304355: Bugfix: Fix scenario with AddFields followed by addFields with references on the 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
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
This was a bug reported by Ferret. Removing the perf optimization due to a scenario being broken.
2024-03-22 11:28:50 +03:00
Mehmet Yilmaz 6aae51c891 Merged PR 1299367: Modify find_and_modify command response
### 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

Modify find&modify command response
2024-03-22 11:28:50 +03:00
Manish Gaur bb2655dcba Merged PR 1303061: Version update for next 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)

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
2024-03-22 11:28:50 +03:00
Mehmet Yilmaz 36aee41586 Merged PR 1296448: Modify insert command response
### 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
The insert command, MongoDB responds with `{"n": int32(1), "ok": float64(1)}`, and Helio responds with `{"ok": int32(1), "n": int32(1)}`.  This PR modify insert command response to simulate MongoDB response.
2024-03-22 11:28:50 +03:00
Lucas Borges Fernandes 2b7b1706af Merged PR 1302307: Supporting group $push in 1.13/1.14 clusters
### Description
2024-03-22 11:28:50 +03:00
Lucas Borges Fernandes ab11777a85 Merged PR 1290864: $push accumulator for $group pipeline stage
### Description
Implementation of the $push accumulator for $group pipeline stage.

Related work items: #2988400
2024-03-22 11:28:50 +03:00
Murat Tuncer fa1cf1d0d1 Merged PR 1300043: Fix git index file path
### Does this PR have any customer impact?
No

### 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
check for the git index file assumed specific placement of the root dir and failed
when used as submodule

This fix make sure git can find the index file
2024-03-22 11:28:50 +03:00
Vinod Sridharan 53bf641ad3 Merged PR 1300971: [Hash] Improve Group/Distinct/Lookup Performance
### Does this PR have any customer impact?
Yes - in 1.16
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Perf
### 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

In Postgres default behavior for Group by/Distinct is to ORDER BY the Grouping term/Distinct which means building a tuple sort + Ordering it before doing the group.

However, if the type defines a hash operator class then the GROUP will use a HashAgg instead of OrderedAgg which is better since it only needs to handle equality (and not Sorted).

Implement a bson hash operator class and add it to 1.15. When the schema deploys it will automatically pick this in the planner.
2024-03-22 11:28:50 +03:00
Vinod Sridharan 7c778c19f8 Merged PR 1296261: Graphlookup part2 - Enable Tests and fix up issues
### 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

From the remaining TODOs handles the following:

- [Done] To handle arrays we do a `$unwind` - move that to doing an eq/in based on the input: This is done by adding a makeArray aggregation operator and using that with `$in` expression
- [Done] Think about cycles: Add a visited check and ignore nodes that are visited before.
- [Done] Need to handle maxDepth infinite recursion more gracefully with $graphLookup.
- [Done] Need to validate against jstests

Still TODO:
- More testing on dotted paths and arrays & reducing traversals
- Implement a hash aggregate operator class for BSON
2024-03-22 11:28:50 +03:00
Vinod Sridharan 6e23d4ff85 Merged PR 1300893: [Misc] Index changes and bugfixes
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix/Features

### 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
1) Enable fast scan by default
2) Fix memory leaks in unique index creations
3) Add option to enable large index keys on an account basis by default
4) Introduce Index term version v1 as a valid version for single path indexes
5) Use index version v1 to ensure metadata terms are marked metadata
6) Enable index term truncation by default on V1 index version
2024-03-22 11:28:50 +03:00
Ujjwal Agrawal ee172ea8d1 Merged PR 1279069: $centerSphere geo operator part 2: add support for all GeoJson types
### 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))
pgmongo_1.14.md

### Description
Add support for all GeoJson types with $centerSphere.
Postgis returns true if 1 out of n points in the doc's GeoJson lies inside the query, but mongodb returns true only if all points are inside. So I added runtime check for all points.
Also added a better way to iterate through WKB buffer without having to worry about segfault if traversal overflows (See IncrementBufferDataBySize in geospatial_query_operator)

Related work items: #2928131
2024-03-22 11:28:50 +03:00
Santiago Fernandez Madero 400da6cd09 Merged PR 1274835: Introduce non exists index term for exists and null equality scenarios
With 100K documents optimizes $exists:true/false in the index from 5x -> 10x depending on the query and scenario now that $exists is not a partial match for non-wildcard indexes.

The optimization uses a new term, the non-exists term, which is a term with no path `""` and of bson type `undefined`, which is generated when the document doesn't contain a field for the indexed path.

This gives us more information when doing index evaluations and we can compare against the non-exist term when doing null equality comparisons or exists checks.
2024-03-15 13:58:37 +03:00
Deepak Bisht 9d49cabefa Merged PR 1295076: [Geospatial] - Fix results not returned when the query WKB is big
### 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
Bug fix while creating the WKB for geometries/geographies where we fill the number of components later (num of points, num of linestring, num of polygons, num of geometries etc) after doing the traversal.
Earlier we used to store the memory address of the place where the `number` is needed to be updated but thats bad because with larger geometries, reallocation of buffer happens and we were losing the place to update the `number`; now instead of storing the memory address, we store the the position relative to the start of buffer so even if the memory is reallocated we know where to add the `number`.

Related work items: #3012835
2024-03-15 13:58:37 +03:00
Murat Tuncer 8d9bef2a79 Create codeql.yml 2024-03-14 13:51:15 +03:00
Vinod Sridharan 6a699bcd46 Merged PR 1289862: Part 1: Skeleton for the GraphLookup aggregation Stage
### 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)
No

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A
### Description
Implement the basic skeleton for $graphLookup under a feature flag.

Remaining TODOs:
1) To handle arrays we do a $unwind - move that to doing an $eq/$in based on the input
2) Implement a hash aggregate operator class for BSON so we can use a UNION query instead of UNION ALL
3) Need to validate against jstests
4) Need to handle maxDepth infinite recursion more gracefully with $graphLookup.
5) More testing on dotted paths and arrays
6) Think about cycles

Related work items: #1798581
2024-03-08 14:01:20 +03:00
Abhishek Johri 965f1b05f7 Merged PR 1291617: Flaky test fix for $currentDate tests
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Testing

### 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

Flakyness fix in $currentDate tests.
It appears to be rounding error and failure log didnt give much info.
Took these steps to eleminate (or atleast reduce flakyness)
- Used FLOOR/CEIL instead of ROUND to be in control of what we want.
- Used correct datatype (reduced unnecessary typecasting, and usage of numeric datatypes).
- Added better error log, so that if a test fails, we will know, if it's a real issue of big time difference and not just rounding error.

Related work items: #2999363
2024-03-08 14:01:20 +03:00
Santiago Fernandez Madero a770e351e6 Merged PR 1289897: Add inverse match UDF to 1.14 schema to be able to use it sooner in prod
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.
2024-03-08 14:01:20 +03:00
Deepak Bisht a5b6ae4c51 Merged PR 1288929: decreased log level to DEBUG1
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Logging

### 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
decreased log level to DEBUG1 for decimal 128 operations
2024-03-08 14:01:20 +03:00
Ayush Saluja affba201b1 Merged PR 1276508: $DateFromParts aggregation operator
### 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
Adds support for $dateFromParts aggregation operator

Related work items: #2019203
2024-03-08 14:01:20 +03:00
Deepak Bisht 68db65384e Merged PR 1289024: fix seg fault in currentOp
### Does this PR have any customer impact?
No

### 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
fix seg fault in currentOp while reading blocking PIDs for an acitivity. Currently it was read as a varlen data but it is INT8 and should be read as by value.
2024-03-08 14:01:20 +03:00
Santiago Fernandez Madero dba20f6b85 Merged PR 1288356: Move main to 1.15 binary and 1.14 schema and fix rename collection version
### 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.
2024-03-04 09:53:14 +03:00
Vinod Sridharan 6e12b04f2d Merged PR 1288570: Improve stability of backend tests
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Testing

### 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
- Remove Buffers from explain - it's not stable across runs and PG versions
- in the scenario where you had an intersection filter, when we set the cost to 0, a bitmapAnd path could be picked. Ensure for PK lookups we always prefer the PK index.
2024-03-04 09:53:14 +03:00
Vinod Sridharan c00dcf25a4 Merged PR 1288370: [Tests] Make more tests pass
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Testing
### 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
Make more JSTests pass by implementing or fixing bugs
2024-03-04 09:53:14 +03:00
Lucas Borges Fernandes b635c244d8 Merged PR 1249041: [OSS] Adding C impl for rename_collection UDF 2024-03-04 09:53:14 +03:00
Vinod Sridharan 38ae02ad41 Merged PR 1286968: [JSTests] Make exclusion test pass
### 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

More

Related work items: #2453917
2024-03-01 17:24:28 +03:00
Zinan Ren 🐾 29b57abc36 Merged PR 1287426: [Vector Search] Enable HNSW index by default
### 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
We will enable the HNSW index on SKU m40 and above.
The GUC pgmongo.enableVectorPreFilter is "on" by default, on the lower SKUs it will be set to be "off" by control plane

Related work items: #2600904
2024-03-01 17:24:28 +03:00