Commit Graph
9 Commits
Author SHA1 Message Date
Parag Jain 5cc1108c87 Merged PR 1482297: [OSS] Test migration Part 9 [Text Search Rum Index Utility]
### 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
Migration of text search related functions.

----
#### AI description  (iteration 1)
#### PR Classification
New feature

#### PR Summary
This pull request introduces a new text search utility using RUM indexes for BSON data.
- Added `bson_dollar_text`, `bson_text_tsquery`, and `bson_text_meta_qual` functions in `sql/udfs/query/bson_dollar_text--1.24-0.sql` and `sql/udfs/query/bson_dollar_text--latest.sql`.
- Created `bson_rum_text_path_ops` operator class in `sql/udfs/rum/bson_rum_text_path_ops--1.24-0.sql` and `sql/udfs/rum/bson_rum_text_path_ops--latest.sql`.
- Added `rum_bson_single_path_extract_tsvector` and `rum_bson_text_path_options` functions in `sql/udfs/rum/bson_rum_text_path_funcs--1.24-0.sql` and `sql/udfs/rum/bson_rum_text_path_funcs--latest.sql`.
- Updated regression tests in `src/test/regress/expected/bson_index_truncation_index_tests.out` and `src/test/regress/expected/public_api_schema.out`.
- Modified `Makefile` to include the RUM extension in `src/test/regress/Makefile` and `pg_helio_api/src/test/regress/Makefile`.
2024-10-17 11:43:08 +03:00
Deepak Bisht febf50e8aa Merged PR 1473095: [OSS] Test migration [23 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)

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

----
#### AI description  (iteration 1)
#### PR Classification
Test migration

#### PR Summary
This pull request adds a new test file to validate the behavior of unique indexes in a distributed environment.
- Added `oss/internal/pg_helio_distributed/src/test/regress/expected/bson_unique_index.out` to test various scenarios involving unique indexes, including creation, insertion, and constraint violations.
2024-10-03 10:48:48 +03:00
Deepak Bisht a4b0c5bc44 Merged PR 1466193: OSS test migration Part 4 [9 tests]
### 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)
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))
NA

### Description
Move more tests to oss

This PR also moves few `mongo_catalog` and `mongo_api_v1` functions to helio
1- range operator is now moved to `helio_api_internal.@<>`
2- `helio_api_internal.collection_table` function is moved but original one is not deleted yet.
3- `helio_api_internal.bson_dollar_lookup_project` moved.
4- `mongo_api_internal.gin_bson_get_single_path_generated_terms` is now moved to `helio_api_internal.gin_bson_get_single_path_generated_terms`
5- `mongo_api_internal.gin_bson_get_wildcard_project_generated_terms` is now moved to `helio_api_internal.gin_bson_get_wildcard_project_generated_terms`

----
#### AI description  (iteration 1)
#### PR Classification
Test migration

#### PR Summary
This pull request migrates 8 tests as part of the ongoing OSS test migration effort.
- Moved `bson_query_operator_tests_index_backcompat.out` and `bson_index_term_generation.sql` to `oss/internal/pg_helio_distributed/src/test/regress`.
- Added new test file `bson_aggregation_expression_variable_tests.out` with extensive BSON expression tests.
2024-10-03 10:48:48 +03:00
Deepak Bisht 05c3a40f06 Merged PR 1316036: [GeoNear] Part 2 - GeoNear JSTest infra and added new distance range operator that is pushed to indexes
### 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
2024-06-03 13:12:17 +03:00
Vinod Sridharan d4d9f5cda9 Merged PR 1333485: [Negation] Add support for pushdown of the $not operator sometimes
### 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
2024-04-26 16:19:32 +03:00
Vinod Sridharan cf88b82fe7 Merged PR 1332248: Selectivity Part 1: Implement operator statistics behind a flag
### 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.
2024-04-26 16:19:32 +03:00
Deepak Bisht 58afe0aa8f Merged PR 1275776: [Pgmongo] - Part 1 GeoNear aggregation stage, add documentation and necessary operators and functions
### 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
2024-04-19 12:03:52 +03:00
Lucas Borges Fernandes 0a88ba774d Merged PR 1269659: [OSS] Changing helio major version to 1 for compatibility
### Description

Bumping major version to 1 in order to prevent future errors with version check utility functions.
2024-02-14 11:28:20 +03:00
Vinod Sridharan d8671eb379 Initial commit for HelioDB 2024-01-12 19:10:20 +00:00