mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
0d616cdcdebdb464894ecae9013c848382218d03
242
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b204b58b82 |
Merged PR 1619783: [engine][collation] Support for sort in runtime
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes, yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support sorting with collation. We define new custom sort operators which compare operands using applicable collation string. `<<<` is for ascending order. `>>>` is for descending order. Example: `SELECT * from <collection> ORDER BY <value> USING <<<` This will further be used for partitioning, grouping, and related comparisons. ---- #### AI description (iteration 1) #### PR Classification New feature: Support for collation in sort operations. #### PR Summary This pull request adds support for collation in sort operations within the database engine. - `src/test/regress/expected/bson_dollar_ops_collation_tests_runtime.out`: Added multiple test cases to verify collation behavior with various sort and order by operations, including case sensitivity and numeric ordering. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4014123 |
||
|
|
2d56e59c69 |
Merged PR 1674853: Add support for nested regex in nin operator for composite index
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Add support for nested regex in nin operator for composite index ---- #### AI description (iteration 1) #### PR Classification This pull request is a feature enhancement that adds support for nested regex patterns in the $nin operator for composite indexes. #### PR Summary The changes update the composite index code to correctly handle nested regex within the $nin operator by passing a new negation flag to various functions and adjusting bound calculations accordingly. Additionally, the pull request updates several expected output files and tests (both SQL and error/explain tests) to reflect the new behavior. - Updated `/oss/pg_documentdb/src/opclass/bson_gin_composite_core.c` functions (e.g. `SetSingleRangeBoundsFromStrategy`, `AddMultiBoundaryForDollarRegex`) to accept and act on a new `isNegationOp` flag for regex bounds. - Modified `/oss/pg_documentdb/include/query/bson_dollar_operators.h` to include an `isNegationOperator` field in the `RegexData` struct. - Revised test files (SQL scripts, expected output files in both distributed and pgmongo directories) to add and validate queries with regex patterns in both $in and $nin operators. - Adjusted several functions such as `ParseOperatorStrategy` and related boundary-setting functions to propagate the negation flag accurately. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
ad80606fda |
Merged PR 1668461: Disable force index pushdown for $geoNear queries
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Other ### 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: documentdb.enable_force_push_geonear_index ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description - $geoNear is always forced pushed to geospatial index and it can make few queries not perfrom well e.g when there are other condition that can potentially use the rum index to perform better. With this PR a GUC is introduced to disable force pushdown of geonear queries ---- #### AI description (iteration 1) #### PR Classification This pull request implements a bug fix to disable force index pushdown for $geoNear queries based on a runtime GUC setting. #### PR Summary The changes adjust the index pushdown logic so that geonear queries can be conditionally routed based on the new configuration flag. This enhancement supports accurate geospatial query planning when the GUC is disabled. - `oss/pg_documentdb/src/opclass/index_support.c`: Added new functions and modified the force index pushdown logic to check the `EnableGeonearForceIndexPushdown` flag. - `oss/internal/pg_documentdb_distributed/src/test/regress/expected/bson_aggregation_pipeline_tests_geonear.out` and `pgmongo/src/test/docdb_compat/expected/bson_aggregation_pipeline_tests_geonear.out`: Introduced tests to verify runtime behavior with the GUC disabled. - `oss/internal/pg_documentdb_distributed/src/test/regress/sql/bson_aggregation_pipeline_tests_geonear.sql`: Updated SQL tests to exercise both scenarios for geonear queries. - `oss/pg_documentdb/src/configs/feature_flag_configs.c`: Defined a new GUC (`enable_force_push_geonear_index`) to control the pushdown behavior. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4197512 |
||
|
|
4d0ed51594 |
Merged PR 1677550: Create indexes inline for create collection
### 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? Yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description If we created the collection in the same command as create indexes, then we don't need to queue it to the index queue - we can just create it since we know we have the lock on the table and it's empty. Make index builds for created tables faster. ---- #### AI description (iteration 1) #### PR Classification This PR introduces a new feature enhancing the index creation process by building indexes inline when a collection is created. #### PR Summary The changes modify the index creation flow to build indexes immediately in the same transaction if the collection is created automatically. This improves efficiency and consistency by reducing asynchronous operations. - `src/commands/create_indexes_background.c`: Added conditional logic to build indexes inline using `create_indexes_non_concurrently` when `createdCollectionAutomatically` is true and the inline creation is not skipped. - `src/configs/feature_flag_configs.c`: Introduced the `SkipCreateIndexesOnCreateCollection` boolean flag to control whether indexes should be created inline during collection creation. - Test output files in various directories were updated to reflect the new behavior by simplifying the index request details in the expected results. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
7c3ca23705 |
Merged PR 1549599: [mongo 8.0] support option sort in updateOne
### 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 support sort option in command updateOne(mongo 8.0) ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for sorting in the `updateOne` operation. - `update.c`: Added handling for the `sort` field in the `updateOne` parameters. - `commands_update.sql` and `commands_update.out`: Added tests to verify the new sorting functionality in `updateOne`. |
||
|
|
8261e772f4 |
Merged PR 1672946: [Update] Make update parsing cheaper
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Currently for Update/Delete, we currently parse the update spec, query spec, etc into pgbsons on startup. Then reuse it per commands. This has a few issues - for large document requests, this causes us to duplicate memory and persist it for the duration of the update and also transcode all up front - this is worse for multi-node when all we need to do is build yet another update spec and push it to the worker. Instead, we now only cache pointers to the spec document; then when we need it we convert to pgbson only if necessary. A consequence of this is that on a single node update, if we're doing a simple updateOne on _id then we would never serialize the updateSpec at all (for instance). We also more eagerly free memory on the intermediate update specs. ---- #### AI description (iteration 1) #### PR Classification Performance optimization for update parsing by refactoring BSON value handling. #### PR Summary This PR streamlines update parsing by replacing heavy BSON initialization routines with lightweight wrappers and converting update-related types from `pgbson*` to `bson_value_t*`, which reduces overhead and improves coordinator/worker compatibility. - `src/commands/update.c`: Replaced multiple `PgbsonInitFromDocumentBsonValue` and similar calls with efficient wrappers like `CreateBsonValueFrom` and updated serialization (including back-compatible array filter and update document formats). - `include/commands/update.h`: Updated update structure fields to use `bson_value_t*` instead of `pgbson*`, aligning interfaces with the new parsing approach. - `src/update/bson_update.c` and `bson_update_operators_workflow.c`: Refactored update type determination and replace document logic to use new BSON value iterators and helper functions. - Other modules (e.g. `commands/find_and_modify.c`, `commands/delete.c`, query operators, sharding) were updated to leverage the lighter-weight BSON representation and its associated helper routines. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
f63bc316ac |
Merged PR 1663053: Enable composite opclass on more tests and fix NaN handling in the index
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description This fixes the handling of NaN in the new composite index op class and also enables more testing using the op class. |
||
|
|
1fd2daa2e6 |
Merged PR 1672196: Fix Lookup Unwind Crash with Inner join
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description - When unwind is used with preserveNullAndEmptyArrays: false, the join type is used as INNER JOIN, but we have the join defined as LATERAL which means it is dependent on results of left query. The bug seems to be intermittent based on the cost of the joins, sometimes the join can be evaluated as LEFT JOIN RIGHT where things work, but when PG decided to go to the path of RIGHT JOIN LEFT it will crash as RIGHT is dependent on LEFT The solution is to always use LEFT JOIN, and for case where `preserveNullAndEmptyArrays: false` add an `IS NOT NULL` check to filter out the right documents that are not a match. ---- #### AI description (iteration 1) #### PR Classification This pull request fixes a bug in lookup unwind operations by correcting the join type used in the aggregation pipeline. #### PR Summary The changes resolve a crash caused by using an inner join during lookup unwind by refactoring the join logic and lookup context. The update enforces LEFT JOIN behavior when preserving null and empty arrays and updates test expectations accordingly. - `oss/pg_documentdb/src/aggregation/bson_aggregation_nested_pipeline.c`: Refactored the lookup join logic by replacing the `useInnerJoin` flag with the `preserveNullAndEmptyArrays` flag and always using LEFT JOIN. - `pgmongo/src/test/docdb_compat/expected/bson_aggregation_stage_lookup_tests.out` and `oss/internal/pg_documentdb_distributed/src/test/regress/expected/bson_aggregation_stage_lookup_tests.out`: Updated expected outputs for BSON aggregation lookup tests. - `oss/internal/pg_documentdb_distributed/src/test/regress/sql/bson_aggregation_stage_lookup_tests.sql`: Added new SQL tests to verify the corrected lookup behavior using LEFT JOIN. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4209808 |
||
|
|
8233bf2fb3 |
Merged PR 1661768: [Perf] Write Optimization for new tables. Creating new tables with 3 columns
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description 1. Creating New tables without creation_time column. This under a GUC. 2. support of 4 col table as well as 3 col table in all code path. ---- #### AI description (iteration 1) #### PR Classification Performance optimization for creating new tables with three columns. #### PR Summary This pull request introduces performance improvements for creating new tables with three columns in the document database. It includes tests for operations on both three-column and four-column tables. - Added `three_column_data_table.out` to test the creation and operations on tables with three columns, including insert, update, and aggregate operations. - Demonstrated the use of GUC (Grand Unified Configuration) to enable and disable creation time for data tables, affecting table operations. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
f6c9ecb9a7 |
Merged PR 1669693: [Cleanup] Remove default feature flags & Version checks
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Remove feature flags that are default for 2 releases Remove version checks that are default now Tag some feature flags for the releases where they should be removed. ---- #### AI description (iteration 1) #### PR Classification This pull request is a code cleanup that removes deprecated default feature flags and associated version checks. #### PR Summary The changes simplify the codebase by eliminating legacy feature flags and version-dependent conditionals, which streamlines aggregation, index creation, and schema validation logic. Key updates include: - **`configs/feature_flag_configs.c`**: Removed default feature flags and related GUC variables with deprecation comments for v104/v105. - **`aggregation/bson_aggregation_pipeline.c`**: Eliminated version checks for the $redact stage and group accumulator logic (e.g., $median, $percentile). - **`commands/create_indexes.c` & `commands/update.c`**: Removed outdated conditionals for unique index statistics and schema validation. - **`planner/documents_planner.c` & `aggregation/bson_aggregation_nested_pipeline.c`**: Erased support for nested aggregation function flags and associated version verifications. - **Test files**: Updated expected outputs and SQL tests to align with the removal of deprecated feature flags and aggregation behaviors. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
fa75e56ac1 |
Merged PR 1669686: Adding feature counter for _internalInhibitOptimization
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description more ---- #### AI description (iteration 1) #### PR Classification This PR introduces a new feature by adding support for tracking the internal inhibit optimization feature usage. #### PR Summary The changes enhance the feature counter system to monitor the `_internalInhibitOptimization` usage in aggregation pipelines and SQL tests. - `mongo_feature_counters.sql`: Added new SQL queries to test and display the feature counter for `_internalInhibitOptimization`. - `feature_counter.h`: Added a new enum constant, `FEATURE_STAGE_INTERNAL_INHIBIT_OPTIMIZATION`, for the new feature. - `bson_aggregation_nested_pipeline.c`: Updated the internal optimization handler to log feature usage. - `feature_counter.c`: Extended the feature mapping to include `_internalInhibitOptimization`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
4b79ce38d4 |
Merged PR 1668682: [Vector Search] Add GUC for the default search parameter calculation
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Adding the GUC documentdb.enableVectorCalculateDefaultSearchParam to enable or disable the calculation of default search parameters. The default value is on Adding feature counts for the usage of default search parameters. ---- #### AI description (iteration 1) #### PR Classification This PR implements a new configuration option to enable or disable the dynamic calculation of default search parameters for vector search indexes. #### PR Summary The pull request adds a GUC flag that controls whether default search parameters (e.g., nProbes for IVF and efSearch for HNSW) are computed dynamically based on collection size. It updates internal calculation functions, test expectations, and feature counters accordingly. - `src/vector/vector_index_kind_impl.c`: Revised the IVF and HNSW search parameter calculation functions to conditionally compute default parameters when the new GUC is enabled. - `src/configs/feature_flag_configs.c` and `include/vector/vector_common.h`: Introduced the new boolean GUC `enableVectorCalculateDefaultSearchParam`. - Test files (e.g., files under `/oss/internal/pg_documentdb_distributed/src/test/regress/expected/` and corresponding `pgmongo` tests): Updated expected outputs and query plans to reflect the new default parameter values. - Feature counter outputs and related SQL tests: Modified to include metrics for the new default search parameter usage. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4194082 |
||
|
|
8b7b93ced7 |
Merged PR 1578129: [Pending release cut 1.102]- Fix projection with bson_dollar_merge_documents for multiple scrnarios
### 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) Yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) Bugfix to override nested arrays in dotted path in `bson_dollar_merge_documents` UDF for few cases ### Description bson_dollar_merge_documents function today recurses into nested arrays always and project in each element of array but that is not correct with mongo semantics. This is only applicable if the projectetion is a dotted path. The function is used in 7 different stages/features today: 1- list_collection: no dotted paths for projection, so this is okay to follow any projection. 2- graphlookup: Mongo does a shallow projection in this case. 3- lookup: Mongo does a shallow projection in this case. 4- inverseMatch: okay as no dotted path projection 5- count: okay as no dotted path projection 6- group : okay as no dotted paths are allowed 7- setWindowFields: only this stage does a full projection even inside nested arrays ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request addresses multiple scenarios for fixing projection with `bson_dollar_merge_documents`. - Added new functions in `oss/pg_documentdb/sql/udfs/projection/bson_projection--0.102-0.sql` to handle various BSON document operations. - Updated `bson_dollar_merge_documents` function to include an `overrideArray` parameter. - Modified test expectations in `oss/internal/pg_documentdb_distributed/src/test/regress/expected/bson_aggregation_pipeline_tests_graphlookup.out` to reflect changes in the `bson_dollar_merge_documents` function. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
84ba0c99d8 |
Merged PR 1572685: [OSS] Fix background index builds for documentdb
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Get background index builds to work for single-node documentdb. This changeset fixes background index builds for OSS by: 1. Scheduling the background index build tasks 2. Moving the distributed functionality (which had not being refactored out of the indexing code during the move to OSS) into distributed hooks, with the base implementation for single-node. 3. Refactoring SQL tests to get even with the above changes. ---- #### AI description (iteration 1) #### PR Classification Bug fix for background index builds in DocumentDB. #### PR Summary This pull request addresses issues with background index builds in DocumentDB by adding comprehensive tests and handling various edge cases. - `commands_create_indexes_background.out`: Added extensive test cases to validate the behavior of `create_indexes_background` function, including handling of invalid inputs, unique constraints, and various index specifications. - Introduced a new schema and function to manage index job statuses. - Enhanced error handling and validation for index creation requests, ensuring proper error messages and statuses are returned for invalid operations. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
f6a67cec94 |
Merged PR 1654888: [engine][collation] Support for $indexOfArray
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) No ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support collation with `$indexOfArray` `$indexOfBytes, $indexOfCP, $strcasecmp` are collation-agnostic. They do not respect collation. `$let` and `$zip` respect collation. ---- #### AI description (iteration 1) #### PR Classification New feature: This pull request adds support for collation in string and array operators, specifically for `$indexOfBytes`, `$indexOfCP`, and `$indexOfArray`. #### PR Summary This pull request introduces collation support to enhance string and array operations, allowing for locale-aware comparisons in `$indexOfBytes`, `$indexOfCP`, and `$indexOfArray` operators. - Modified `bson_expression_string_operators.c` to include collation handling in string comparison functions and updated function signatures to accept collation strings. - Updated `bson_expression_array_operators.c` to support collation in array index operations, including changes to function signatures and argument handling. - Introduced new structures `StringCompareArguments` and `IndexOfArrayArguments` to manage collation strings and arguments for the respective operations. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
f6d20fbf8a |
Merged PR 1646920: [engine][collation] Support for Arrays and Documents
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support collation with comparison of `array` and `document` values. Also adds support for `$in` on nested arrays and documents. ---- #### AI description (iteration 1) #### PR Classification New feature: Adds support for collation-aware hashing of arrays and documents in BSON. #### PR Summary This pull request introduces collation-aware hashing for BSON arrays and documents, enhancing the handling of collation in hash sets. It refactors existing hash functions to accommodate collation strings and recursive hashing of nested BSON structures. - `hashset_utils.c`: Implements collation-aware hashing functions for BSON values, including recursive handling of arrays and documents. - `bson_expression_set_operators.c`: Replaces existing hash set creation with collation-aware hash set creation. - `bson_dollar_operators.c`: Updates logic to use collation-aware hash sets for `$in` queries, removing unsupported scenarios. - `hashset_utils.h`: Adds a new struct `BsonValueHashEntry` to store BSON values with collation strings. - `collation.h`: Moves `IsBsonTypeCollationAware` function to handle collation applicability checks. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4111861, #4115239 |
||
|
|
efa2b802f6 |
Merged PR 1659003: [Composite OpClass] Enable Runtime Functions and add test coverage
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature/POC ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Fix up runtime index recheck function support to reduce loading documents. This should reduce the number of runtime rechecks that are needed for documents and trust the index more as we will evaluate these clauses directly on the index first. Also add option to trigger jstest coverage for the new opclass - and set them to run on the MX jstests - this is still disabled right now since there are some failing tests but will be enabled separately. ---- #### AI description (iteration 1) #### PR Classification New feature: This pull request introduces runtime functions for composite index operations and enhances test coverage. #### PR Summary This pull request enables runtime functions for composite index operations, improving the flexibility and efficiency of index handling. It also adds test coverage to ensure the reliability of these new features. - `bson_gin_composite_entrypoint.c`: Refactored comparison logic to support runtime functions for index rechecks. - `bson_gin_composite_core.c`: Implemented `IsValidForIndexValue` function to handle various BSON index strategies with runtime rechecks. - `create_indexes.c`: Modified index creation logic to conditionally enable new composite index opclass based on configuration. - `bson_gin_composite_private.h`: Added `IndexRecheckArgs` structure to support runtime recheck strategies. - `testing_configs.c`: Introduced configuration options for enabling the new composite index opclass by default. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
2eb9573add |
Merged PR 1659401: [Infra] Enable diskann on pg17
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Now that diskann supports Pg17, enable consumption of diskann in pg17. ---- #### AI description (iteration 1) #### PR Classification Infrastructure update to enable the `diskann` extension on PostgreSQL 17. #### PR Summary This pull request removes previous restrictions and enables the `diskann` extension to be built and packaged for PostgreSQL 17, addressing compatibility issues. - Removed conditional checks in `oid_cache.c` and `process_utility_hook.c` that prevented `diskann` support for PG17. - Updated `pipeline_create_setup_packages.sh` and `install_setup_pg_diskann.sh` to allow packaging and installation of `pg_diskann` for PG17. - Modified `pipeline_build_extension_core.sh` to remove PG17-specific build skips for `diskann`. - Adjusted test configurations in `test_mutate_17` by removing specific test skips related to `diskann`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
ac6f028c86 |
Merged PR 1653287: [Vector Search] Enable iterative index scans for HNSW and IVF in filtering searches
### 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?
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
### Description
With the release of [pgvector 0.8.0](https://github.com/pgvector/pgvector/tree/5bc7937715c67add21c8bcc0d4284162c7a0174f?tab=readme-ov-file#iterative-index-scans), which supports iterative scan for HNSW and IVF, we enable it in filtering search to support pre-filtering(currently it is post-filtering)
- Pass the new parameter "iterativeScan" through the function bson_search_param from the coordinator to the worker.
Example : { "efSearch" : 10, "iterativeScan" : "relaxed_order"}
- Enable iterative scan for hnsw/ivf index on workers:
SET LOCAL hnsw.iterative_scan = relaxed_order;
SET LOCAL ivfflat.iterative_scan = relaxed_order;
relaxed_order by default, which allows results to be slightly out of order by distance, but provides better recall.
After iterative search, re-ordering will be applied to the results.
- Set iterative scan for diskann index to relaxed_order
SET LOCAL diskann.iterative_search = relaxed_order;
- Check the availability of iterative scan in pgvector
The pgvector iterative scan is available from version 0.8.0. Currently, if the pgvector extension has not been upgraded to 0.8.0, the iterative scan will be disabled in those clusters until pgvector is upgraded to 0.8.0.
###Related GUCs
**documentdb.vectorPreFilterIterativeScanMode**: enable iterative index scans, which will automatically scan more of the index until enough results are found (relaxed_order by default)
- off, disable iterative scan
- relaxed_order, allows results to be slightly out of order by distance, but provides better recall
- strict_order, ensures results are in the exact order by distance
####GUCs from pgvector
**hnsw.max_scan_tuples**: Specify the max number of tuples to visit (20,000 by default)
**hnsw.scan_mem_multiplier**: Specify the max amount of memory to use, as a multiple of work_mem (1 by default)
**ivfflat.max_probes**: Specify the max number of probes(32768 by default)
###Mongo Command(no change in this PR)
```
db.testing_hnsw_vector_collection.aggregate(
[
{
"$search": {
"cosmosSearch": {
"vector": [ 3.0, 4.9, 1.0 ],
"path": "vect",
"filter": {"meta.a": [ { "b" : 3 } ]},
"k": 4,
"efSearch": 100
},
}
},
{
"$project": {
"rank": {
"$floor": [{"$multiply": [{ "$meta": "searchScore"},100000]}]
}
}
}
])
```
----
#### AI description (iteration 1)
#### PR Classification
New feature
#### PR Summary
This pull request introduces iterative index scans for HNSW and IVF in filtering searches, enhancing the pre-filtering capabilities of vector searches...
|
||
|
|
f602705f11 |
Merged PR 1658397: [Vector Search] Enable prefiltering 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Set default prefilter feature flag to true ---- #### AI description (iteration 1) #### PR Classification Enable prefiltering by default for vector search, addressing the iterative filtering search work item. #### PR Summary This pull request modifies the vector search functionality to enable prefiltering by default, optimizing query execution by utilizing index scans instead of sequential scans and sorting. This change is expected to improve performance and efficiency in vector search operations. - Changes in `/pgmongo/src/test/docdb_compat/expected/bson_aggregation_pipeline_tests_vector_hnsw_planner.out`: Replaced sequential scans and sorts with index scans for vector search queries. - Changes in `/oss/internal/pg_documentdb_distributed/src/test/regress/expected/bson_aggregation_pipeline_tests_vector_mongo.out`: Updated to use index scans, improving query performance. - Changes in `/pgmongo/src/test/docdb_compat/expected/bson_aggregation_pipeline_tests_vector_mongo.out`: Enabled index-based filtering, replacing unsupported filter errors with index checks. - Changes in `/oss/internal/pg_documentdb_distributed/src/test/regress/expected/bson_aggregation_pipeline_tests_vector_ivf.out`: Reduced the number of returned rows by using index scans for vector searches. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #3612471 |
||
|
|
356361bceb |
Merged PR 1628037: Add string case support for '$toDate' operator
### Does this PR have any customer impact? Yes, by this PR, $toDate could process string case ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Enhancement for exsiting operator ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) Add string case support for '$toDate' operator ### Description Before this PR, `$toDate` could not parse a string to datetime. With this PR, we leverage the ability of `$dateFromString` to finish the support of string case for `$toDate` operator ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for string case conversion in the `$toDate` operator. - Added `StringToDateWithDefaultFormat` function in `bson_expression_date_operators.c` to handle string to date conversion. - Updated `ProcessDollarToDate` in `bson_expression_type_operators.c` to utilize the new string conversion function. - Added tests for string case conversion in `$toDate` operator in `bson_aggregation_type_operators_tests.sql`. - Updated documentation and release notes to reflect the new feature. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
e05e91ba51 |
Merged PR 1650017: [Vector Search] Add support for PQ compression in the Diskann index
### 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
### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))
### Description
Adding support Product Quantization (PQ) compression in vector index, which is a popular method for dramatically compressing high-dimensional vectors to use less memory, and for making nearest-neighbor search faster.
Note: currently, this PQ compression is only supported by the Diskann index.
### Related GUCs
**documentdb.enableVectorCompressionPQ**: Enables vector PQ compression (enabled by default).
### Create index spec:
- **compression**(optional):
- "half": half-precision vector, which using 16 bits floats.
- "pq": product quantization compression.
- **pqCompressedDims**(optional): indicates the dimensions after compression. If not specified, it will be automatically calculated based on the original dimensions.
- Minimum: 1
- Maximum: 8000
- **pqSampleSize**(optional):Indicates the number of samples PQ uses to generate the initial centroids. The default value is 1000.
- Minimum: 1000
- Maximum: 100000
**Note**: It is recommended to create the index after the collection has some data.. If the collection is empty, random vectors within the range [-1, 1] are used to generate the initial centroids and create the index. If the number of documents is less than pqSampleSize, the training data is padded with random data within the range [min, max] from the sampled vector data.
### Command example
```
db.runCommand(
{ "createIndexes": "testing_vector_collection", "indexes":
[{
"key": { "v": "cosmosSearch" },
"name": "hsnw_index",
"cosmosSearchOptions":
{
"kind": "vector-diskann",
"similarity": "L2",
"dimensions": 1536,
"compression": "pq",
"pqCompressedDims": 96,
"pqSampleSize": 2000
}
}]
} )
```
### Search spec:
No changes
----
#### AI description (iteration 1)
#### PR Classification
New feature: This pull request adds support for Product Quantization (PQ) compression in the Diskann index.
#### PR Summary
This pull request introduces support for PQ compression in the Diskann index, enhancing vector search capabilities. It includes error handling for unsupported compression types and validation for PQ parameters.
- Updated `/pgmongo/src/test/regress/expected/bson_aggregation_pipeline_tests_vector_diskann.out` to include tests for PQ compression, error cases, and validation of PQ parameters such as `pqCompressedDims` and `pqSampleSize`.
- Added tests for vector search with PQ compression, including L2, cosine, and IP similarity measures.
- Implemented checks for maximum dimensions and resource limits during PQ index creation.
<!-- GitOpsUserAgent=GitOps.Apps.S...
|
||
|
|
c7e25699df |
Merged PR 1656145: version update for 103 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description ---- #### AI description (iteration 1) #### PR Classification Version update for the release of version 103. #### PR Summary This pull request updates the version numbers across several control files and adds release notes for version 1.103 and 1.104. It also includes changes to SQL files and their corresponding SHA1 checksums. - `/oss/internal/pg_documentdb_distributed/documentdb_distributed.control`, `/oss/pg_documentdb/documentdb.control`, `/oss/pg_documentdb_core/documentdb_core.control`, and `/pgmongo/pgmongo.control`: Updated default version numbers. - `/docs/release_notes/pgmongo_1.103.md` and `/docs/release_notes/pgmongo_1.104.md`: Added release notes for versions 1.103 and 1.104. - `/pgmongo/sql/pgmongo--1.103-1--1.104-1.sql`: Added new SQL file for version transition. - `/docs/release_notes/toc.yml`: Updated table of contents to include new release notes. - `/oss/CHANGELOG.md`: Added entry for documentdb v0.104-0. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4140262 |
||
|
|
5a19661e8b |
Merged PR 1654645: [Feature Flags] Refactoring features and add some tracking
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description - Add a new section for tracking feature flags - Add a feature counter to track customers whoc an benefit from the new rum_index_scan. ---- #### AI description (iteration 1) #### PR Classification Refactoring and feature enhancement with added tracking capabilities. #### PR Summary This pull request refactors feature flags and introduces new tracking capabilities for feature usage. It reorganizes the feature flag sections and adds new flags for various functionalities. - Refactored and added new feature flags in `feature_flag_configs.c`, including indexing, planner, and aggregation features. - Updated `custom_scan_continuation.c` to improve index scan handling and added feature usage reporting. - Modified `insert.c` to handle snapshot management more effectively. - Enhanced feature usage tracking in `feature_counter.c` and `feature_counter.h` by adding a new feature counter for index scans with limits. - Updated test expectations in multiple files to reflect the new feature tracking changes. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
1e1a724c3f |
Merged PR 1654396: [Update procedure] Support Unsharded Remote collections
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description For the Update stored procedure for an unsharded collection on a remote node, we would typically delegate the entire request to the worker and process it there. With a SPROC, we can't delegate the whole thing to the worker. At the same time we can't make it request by request doing RPC to the worker. This change strikes a balance between the two, where we get batches of batchWriteInternalSubTransactionCount (~512) requests, and call update worker with it. Each batch is run as a single transaction on the worker, parsed, evaluated and Commited within the function. And then the outer Sproc commits the whole thing. This balances between minimizing RPCs and Committing Frequently. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request introduces support for unsharded remote collections in the update procedure, enhancing the functionality of batch updates. Key changes include: - `update.c`: Added functions to deserialize writer errors and upserted results, serialize update batch parameters, and process batch updates non-transactionally for unsharded collections. - `commands_update_bulk.out`: Updated expected test outputs to reflect changes in batch update behavior. - `commands_update_bulk.sql`: Modified SQL tests to disable local writes and test batch update functionality with remote collections. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4093126 |
||
|
|
4ed646dfb9 |
Merged PR 1647233: [Bulk Insert][Perf] support for bulk insert via procedures
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Currently bulk insert run as a function which means that the entire execution runs as a single transaction. Each batch insert is handled as a subtransaction and rolled back to a save point if it fails. This means that document locks are held for longer, and we can hit limits w.r.t. max documents updated per transaction. In multi-node setups this also means distributed transactions are held longer causing loss of connection pools. This change introduces a stored procedure for bulk insert that periodically "Commits" the state to WAL and starts a new transaction. This more mirrors what the non-atomic bulk update is supposed to do. The old function is retained to be used within transactions. ---- #### AI description (iteration 1) #### PR Classification Performance improvement for write commands. #### PR Summary This pull request introduces a new procedure for handling write commands, enhancing performance by optimizing user-specific command execution. It includes the addition of new functions and procedures to manage MongoDB operations more efficiently. - Added new SQL functions and procedures in `/pgmongo/sql/udfs/gateway_funcs/command_funcs--1.103-0.sql` for running commands, queries, DDL, and write operations as a specific user. - Introduced new insert functions and procedures in `/oss/pg_documentdb/sql/udfs/commands_crud/insert--0.103-0.sql` to handle MongoDB insert operations. - Implemented `pgmongo_run_write_procedure_as_user` and `ExecuteWriteCommandCore` in `/pgmongo/src/infrastructure/command_funcs.c` to manage write commands with user context. - Added `CommitOuterInsertTransactions` function in `/oss/pg_documentdb/src/commands/insert.c` to handle transaction commits outside of transaction blocks. - Introduced a feature flag `EnableWriteProcedure` in `/oss/pg_documentdb/src/configs/feature_flag_configs.c` to control the enabling of write procedures. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
bec1aa3562 |
Merged PR 1638286: [engine][collation][enhancement] Extend bson_expression_get for collation support
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Add a new bson_expression_get that appends the collationString to the got value, if a valid collationString is passed to it. This will be used as a helper function to operations that rely on bson_expression_get to pass down collation such as bson_lookup_join_filter. If no collation string is passed as an arg, we simply return the got value. ---- #### AI description (iteration 1) #### PR Classification New feature to support `$graphLookup` in the engine with collation. #### PR Summary This pull request adds support for `$graphLookup` with collation in the engine. - Added new functions in `oss/pg_documentdb/sql/udfs/aggregation/bson_lookup_functions--0.103-0.sql` for `$graphLookup` operations. - Modified `oss/pg_documentdb/src/aggregation/bson_aggregation_nested_pipeline.c` to handle collation in `$graphLookup` join filters. - Updated `oss/pg_documentdb/src/operators/bson_expression.c` to remove collation handling from `bson_expression_get`. - Added `BsonDollarLookupJoinFilterWithCollationFunctionOid` in `oss/pg_documentdb/src/metadata/metadata_cache.c`. - Adjusted collation handling in `oss/pg_documentdb/src/query/bson_dollar_operators.c` for `$graphLookup`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4104899 |
||
|
|
36bb3e2920 |
Merged PR 1650400: [Bulk Update] Setup bulk update infrastructure
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Currently bulk updates run as a function which means that the entire execution runs as a single transaction. Each batch update is handled as a subtransaction and rolled back to a save point if it fails. This means that document locks are held for longer, and we can hit limits w.r.t. max documents updated per transaction. In multi-node setups this also means distributed transactions are held longer causing loss of connection pools. This change introduces a stored procedure for bulk update that periodically "Commits" the state to WAL and starts a new transaction. This more mirrors what the non-atomic bulk update is supposed to do. The old function is retained to be used within transactions. Still TODO: For unsharded collections in a multi-node setup, we need to send batches of updates to the worker. This is not wired up in this change. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request introduces a new bulk update feature for handling non-transactional updates in the MongoDB wire-protocol. It adds new functions and procedures to support bulk updates and modifies existing update logic to accommodate this new functionality. - Added `update_bulk` procedure and related functions in `sql/udfs/commands_crud/update--0.103-0.sql` for non-transactional bulk updates. - Implemented `command_update_bulk` in `src/commands/update.c` to handle bulk updates outside of transactions. - Enhanced `ProcessBatchUpdateCore` in `src/commands/update.c` to support transactional and non-transactional updates. - Updated feature tracking in `include/utils/feature_counter.h` and `src/infrastructure/feature_counter.c` to include `FEATURE_COMMAND_UPDATE_BULK`. - Modified SQL scripts `documentdb--0.102-1--0.103-0.sql` and `pgmongo--1.102-1--1.103-0.sql` to include the new update functionality. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
71f084dca8 |
Merged PR 1644618: [Index] Improve wildcard index performance
### 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
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))
### Description
Improve index build and insert performance (especially for wildcard indexes).
The current wildcard indexes are heavily bloated - for 50 GB of data that is very array/document heavy, we could end up producing a 300 GB index in some cases.
To improve this, there's considerations of parallel index builds (introduced in PG17+), but also there's something to be said about reducing index bloat. This PR does that in two ways:
1) Given that index truncation happens at ~2500 bytes (or less), the possibility of compression for index terms is low. Therefore, even if the primary document is compressable, the index isn't. This introduces compression for index entries with a custom GUC that manages that. Especially for larger arrays and documents this yields a non-trivial saving.
2) There's a realization that with wildcard indexes and arrays, there's term duplication: An path `"a": [ 1, 2, 3 ]` generates
```
{ "a": [ 1, 2, 3 ] }
{ "a": 1 }
{ "a": 2 }
{ "a": 3 }
{ "a.0": 1 }
{ "a.1": 2 }
{ "a.2": 3 }
```
where the last 3 terms can be made redundant with the first 3. this attempts to remove those extra terms by now only generating:
```
{ "a": [ 1, 2, 3 ] }
{ "a": 1 }
{ "a": 2 }
{ "a": 3 }
```
Query plans that query a.0 will not be pushed to this index currently.
However, in the future this can be removed by querying a.0 as 'a' and running a runtime recheck.
Given that this only impacts queries that explicitly query by integer keys, and on wildcard indexes, this is deemed acceptable for the improvement in size reduction on the index.
----
#### AI description (iteration 1)
#### PR Classification
New feature
#### PR Summary
This pull request introduces support for wildcard terms in the indexing system, enhancing query capabilities and performance.
- Refactored `SerializeBsonIndexTermCore` in `gin_index_term.c` to use a new helper function `BuildSerializedIndexTerm`.
- Added `SerializeBsonIndexTermWithCompression` function in `gin_index_term.c` for handling compressed index terms.
- Implemented `QueryPathHasDigits` and `FailIfQueryPathHasDigitsForWildcard` functions in `bson_gin_entrypoint.c` to validate query paths for wildcard indexes.
- Updated various query extraction functions in `bson_gin_core.c` to use `filterElement` from `BsonExtractQueryArgs` instead of directly accessing the query.
- Enhanced `GenerateIndexExprStr` in `create_indexes.c` to include options for reduced wildcard terms and generating not-found terms.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
|
||
|
|
591a38b86d |
Merged PR 1606660: [Vector Search] Support half-precision vector indexing
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description With the release of pgvector 0.7.0, which supports [Half-Precision Indexing](https://github.com/pgvector/pgvector?tab=readme-ov-file#half-precision-indexing), vectors can have up to 4,000 dimensions ###Related GUCs **documentdb.enableVectorCompressionHalf**: enable vector compression(enabled by default) - off, disable vector compression - on, enable vector compression ###New parameters - Create index spec: "compression": string "half": half-precision vector, which using 16 bits float - Search spec: "oversampling": double Oversampling factor: Oversampling retrieval from half index to compensate for the loss of precision. Minimum value is 1. This parameter is only permitted when a compression method is used on the vector index. For example, if oversampling=1.5 and k=10, then oversampling*k=15 vectors from a compressed index. Then, the full 32-bits vector will be used for the subsequent ordering and scoring, ###Mongo Command ``` db.runCommand( { "createIndexes": "testing_vector_collection", "indexes": [{ "key": { "v": "cosmosSearch" }, "name": "hsnw_index", "cosmosSearchOptions": { "kind": "vector-hnsw", "similarity": "L2", "dimensions": 3, "compression": "half" } }] } ) ``` ``` db.testing_hnsw_vector_collection.aggregate( [ { "$search": { "cosmosSearch": { "vector": [ 3.0, 4.9, 1.0 ], "path": "vect", "filter": {"meta.a": [ { "b" : 3 } ]}, "k": 4, "efSearch": 100, "oversampling": 2.0 }, } }, { "$project": { "rank": { "$floor": [{"$multiply": [{ "$meta": "searchScore"},100000]}] } } } ]) ``` ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for half-precision vector indexing in the vector search functionality. - `metadata_cache.c`: Added functions for half-precision vector similarity operators and functions. - `SearchTests.cs`: Added integration tests to validate half-precision vector search, including error cases and index creation scenarios. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
6207072048 |
Merged PR 1632713: Add insert test for duplicate fields and add comments on server behavior with duplicate fields for inserts
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description - Add insert command duplicate field backend test ---- #### AI description (iteration 1) #### PR Classification New feature and documentation. #### PR Summary This pull request adds tests for inserting documents with duplicate fields and documents the server behavior regarding such inserts. - Added tests in `commands_insert.out` and `commands_insert.sql` to verify the server does not deduplicate documents with duplicate fields. - Updated `insert.c` to document that the server does not attempt to deduplicate documents during insertion. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
63ffc2501d |
Merged PR 1637344: [OSS] cleanup, don't use 'vCore' term or aka.ms short links on OSS
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Other ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) NA ### Description - cleanup Oss. - Remove referrences of `vCore` or `aka.ms` short links ---- #### AI description (iteration 1) #### PR Classification Code cleanup #### PR Summary This pull request removes references to 'vCore' and aka.ms short links from the codebase. - `scripts/validate_helio_extension_state.sh`: Added checks to ensure no 'vCore' or aka.ms links are present. - `pgmongo/src/infrastructure/logger_hooks.c`: Removed aka.ms link from error messages and added a function to update errors. - `oss/pg_documentdb/src/commands/users.c`: Removed aka.ms link from user count limit error message. - `oss/internal/pg_documentdb_distributed/src/test/regress/sql/bson_aggregation_string_operators_tests.sql`: Updated test cases to replace 'vcore' with 'v_core'. - `pgmongo/src/test/regress/expected/user_crud_commands.out`: Adjusted error messages to remove aka.ms links. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
8ea9769598 |
Merged PR 1639388: [engine][collation] Unsupported Aggregation Stages
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Aggregation stages which do not support collation yet: `bucket, group, setWindowFields, fill, geoNear, sortByCount` If collation is provided for an aggregation whose pipeline has any of these stages, the aggregation fails with `FEATURE_NOT_SUPPORTED` ---- #### AI description (iteration 1) #### PR Classification Code enhancement to handle unsupported aggregation stages with collation. #### PR Summary This pull request adds error handling for unsupported aggregation stages when collation is applied. - `bson_aggregation_pipeline.c`, `bson_aggregation_nested_pipeline.c`, `bson_aggregation_window_operators.c`: Added checks and error messages for unsupported collation in stages like `$bucket`, `$replaceWith`, `$geoNear`, `$fill`, `$group`, `$documents`, `$setWindowFields`, and `$sortByCount`. - `bson_dollar_ops_collation_tests_runtime.sql`: Added test cases for unsupported aggregation stages with collation. - `bson_dollar_ops_collation_tests_runtime.out`: Updated expected output to include error messages for unsupported collation in various stages. - `bson_query.h`: Refactored `IsBsonTypeCollationAware` function for better readability. - `bson_dollar_operators.c`: Simplified collation applicability check using `IsBsonTypeCollationAware`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4022806 |
||
|
|
48e250ab6d |
Merged PR 1641717: [oss] add arm64 to test workflow and update geo 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
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))
None
### Description
arm64 and amd64 handle floating-point math differently, which caused tiny differences for some geo related tests. Reduce the decimal positions to fix them.
test failure messages
**geospatial_extract_2d_geometries.out**
```
SELECT public.ST_ASTEXT(
public.ST_SUBDIVIDE(
public.ST_MAKEVALID(public.ST_SEGMENTIZE('SRID=4326;POLYGON((-180 40, -157.5 40, -157.5 55, -180 55, -180 40))'::public.geography, 500000)::public.geometry),
8 -- 8 is the default number of max vertices a divide segment can have
)::public.geography
);
st_astext
---------------------------------------------------------------------
- POLYGON((-163.1021234145348 40.4105866220272,-160.29991441874373 40.205209224804754,-180 40,-174.39787658546524 40.4105866220272,-168.75000000000003 40.54826391836536,-163.1021234145348 40.4105866220272))
+ POLYGON((-163.1021234145348 40.4105866220272,-160.29991441874373 40.205209224804754,-180 40,-174.39787658546524 40.41058662202719,-168.75000000000003 40.54826391836536,-163.1021234145348 40.4105866220272))
```
**bson_aggregation_pipeline_tests_geonear.out**
```
SELECT * FROM documentdb_api_catalog.bson_aggregation_pipeline('db', '{ "aggregate": "geonear_lookup_1", "pipeline": [ { "$geoNear": {"near": {"type": "Point", "coordinates": [0, 1]}, "distanceField": "distance", "spherical": true, "key": "a"}}, {"$lookup": {"from": "geonear_lookup_2", "localField": "x", "foreignField": "x", "as": "new"}}] } ');
document
---------------------------------------------------------------------
- { "_id" : { "$numberInt" : "1" }, "a" : [ { "$numberInt" : "10" }, { "$numberInt" : "10" } ], "x" : { "$numberInt" : "5" }, "distance" : { "$numberDouble" : "1491297.403229492018" }, "new" : [ { "_id" : { "$numberInt" : "5" }, "foo" : "bar", "a" : [ { "$numberInt" : "5" }, { "$numberInt" : "5" } ], "x" : { "$numberInt" : "5" } } ] }
+ { "_id" : { "$numberInt" : "1" }, "a" : [ { "$numberInt" : "10" }, { "$numberInt" : "10" } ], "x" : { "$numberInt" : "5" }, "distance" : { "$numberDouble" : "1491297.4032294917852" }, "new" : [ { "_...
|
||
|
|
0f84538074 |
Merged PR 1639495: [engine][collation] Support for $documents and $replaceWith
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support for $documents and $replaceWith operations with collation in the aggregation pipeline. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for collation with `$documents` and `$replaceWith` aggregation stages. - Added collation support for `$documents` and `$replaceWith` stages in `bson_aggregation_pipeline` in `bson_dollar_ops_collation_tests_runtime.out` and `bson_dollar_ops_collation_tests_runtime.sql`. - Updated `pg_documentdb/src/aggregation/bson_aggregation_nested_pipeline.c` to handle collation strings in the context. - Updated documentation in `docs/release_notes/pgmongo_1.103.md` and `oss/CHANGELOG.md` to reflect the new features. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4095421, #4095425 |
||
|
|
f97fd41b6a |
Merged PR 1640786: [Wildcard | Gin] Miscellaneous index improvements
### 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? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description 1) For wildcard term generation, we were iterating every array twice (once for the array term and once for the array path term). Instead, iterate the array once and generate the terms together 2) We were also enumerating every array a 3rd time to count the keys - estimate key term count by using a log2(size) 3) Add the new stages for currentOp index tracking 4) Use dynamic_library_path to avoid specifying load library path in hosted environments (this also fixes parallel build for the internal index POC) ---- #### AI description (iteration 1) #### PR Classification Code cleanup and performance improvement. #### PR Summary This pull request focuses on improving the indexing mechanism for BSON documents in the Gin index. - `bson_gin_core.c`: Refactored `GenerateTermsCore` function to split logic into `GenerateArrayPath` and `GenerateTermPath` for better readability and maintainability. - Enhanced term generation for arrays and nested documents to optimize index lookup and query performance. - Improved memory management by using `StringInfo` for path construction and ensuring proper buffer allocation. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
4da81c67e6 |
Merged PR 1588632: [engine][collation] Support for Aggregation, Find, Query Match on Sharded Collections
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support collation for aggregation and query match queries on sharded collections. If the `shard key filter` is collation-aware, we make the query distributed and push it to all shards. ---- #### AI description (iteration 1) #### PR Classification New feature: Collation support for aggregation and query match on sharded collections. #### PR Summary This pull request adds collation support for aggregation and query match operations on sharded collections. - `bson_dollar_ops_collation_tests_runtime.sql`: Added tests for collation-aware shard key queries. - `sharding.c`: Introduced logic to track collation-aware shard key fields and updated related functions. - `query_operator.c`: Modified to include shard key filters only if they are not collation-sensitive. - `bson_aggregation_pipeline.c`: Added collation-aware checks for shard key filters in aggregation pipelines. - `bson_query.h`: Added utility function `IsBsonTypeCollationAware` to check if BSON types are collation-aware. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #3915171, #3922023 |
||
|
|
6349b5adca |
Merged PR 1633710: [Composite POC] Improve performance on multi-key path scenarios
### 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? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description For multi-key paths, track them on insert/update. When doing a query, check the index for multi-key paths - if there are any then rewrite the query differently. ---- #### AI description (iteration 1) #### PR Classification Performance improvement for multi-key path scenarios in composite indexes. #### PR Summary This pull request enhances the performance of multi-key path scenarios by introducing optimizations and refactoring the handling of composite indexes. - `oss/pg_documentdb/src/index_am/rum.c`: Introduced `IndexMultiKeyStatus` enum and `CheckIndexHasArrays` function to optimize index scans. - `oss/pg_documentdb/src/opclass/bson_gin_composite_core.c` and `oss/pg_documentdb/src/opclass/bson_gin_composite_entrypoint.c`: Added functions to merge single variable bounds and parse composite query specifications. - `oss/pg_documentdb/include/index_am/documentdb_rum.h`: Updated function signatures to use `IndexAmRoutine` pointers. - `pgmongo/src/helio_gin_am/helio_gin_utils.c`: Adjusted function calls to use `IndexAmRoutine` pointers. - `pgmongo/src/metadata/oid_cache.c`: Changed `missingOk` parameter to `true` in `RunIndexOpAsUserProcedureId`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
b657d1057e |
Merged PR 1633206: [Composite POC] Fix correctness in composite op class
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature/POC ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Fix up diff and correctness issues with the composite op class - Fix $range correctness with arrays - Fix type bracketing for $range - Fix term generation for numbers. ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request addresses correctness issues in the composite operation class. - `bson_gin_composite_entrypoint.c`: Improved handling of truncation and scan keys in `gin_bson_composite_path_consistent` and `gin_bson_composite_path_extract_query`. - `bson_gin_composite_core.c`: Enhanced `UpdateRunDataForVariableBounds` to correctly handle term mapping and bounds. - `bson_query_operator_tests_index_composite.out`: Updated expected test results to reflect the corrected behavior. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
2a55448755 |
Merged PR 1633198: [hotfix] creation_time column 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) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description [hotfix] disabing creation time changes for this release train ---- #### AI description (iteration 1) #### PR Classification Bug fix to address issues with the `creation_time` column during upgrades. #### PR Summary This pull request introduces a hotfix to manage the `creation_time` column during complete upgrades. - Added a new feature flag `alterCreationTimeInCompleteUpgrade` in `configs/feature_flag_configs.c`. - Modified `cluster_operations.c` to conditionally alter `creation_time` based on the new feature flag. - Updated test files `extension_upgrade_alter_creation_time_1.102-0.sql` and `extension_upgrade_alter_creation_time_1.102-0.out` to set the new feature flag during tests. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
77f9dc3b75 |
Merged PR 1631702: [Composite POC] Add Basic tests for Composite Index OpClass
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Enable query_operator_tests for composite index op-class Found 2 minor bugs that's fixed Found issues in the existing tests that didn't use index in certain cases. Fix that too. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds basic tests for Composite Index OpClass. - Changes in `src/opclass/bson_gin_composite_core.c` include the addition of multiple functions to handle various BSON strategies (`$all`, `$in`, `$nin`, bitwise operators, `$type`, etc.) and error handling improvements. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
4c0942ce13 |
Merged PR 1612078: [engine][collation] Support for Complex Locale
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support advanced locales ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request introduces a collation add-on to enhance locale and collation type handling in the collation module. - `collation.c`: Added support for parsing and handling collation types within locale strings, including replacing underscores with hyphens. - `bson_dollar_ops_collation_tests_runtime.out`: Added new test cases to validate collation functionality with various locales and collation types. - `bson_dollar_ops_collation_tests_runtime.sql`: Updated SQL test scripts to include new collation scenarios and validate query matching with different collation settings. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
d4f127106a |
Merged PR 1574869: [engine][compat] BinData Conversion to/from String
### 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
### Are you introducing any new config? If yes, do you have tests with and without them being set? No
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))
### Description
Support conversion to binData from string and vice versa.
$convert to BinData
```
"$convert": {
"input": <string>,
"to": {
"type": "binData",
"subtype": <bson_subtype_t>
},
"format": <"base64"/"string"/"hex"/"uuid"/"base64url">
}
```
OR
```
--- subtype will default to 0
"$convert": {
"input": <string>,
"to": "binData",
"format": <"base64"/"string"/"hex"/"uuid"/"base64url">
}
```
BinData $toString
```
{ $toString: <binData expression> }
```
----
#### AI description (iteration 1)
#### PR Classification
New feature
#### PR Summary
This pull request introduces support for converting data to `BinData` using the `$convert` operator.
- `src/operators/bson_expression_type_operators.c`: Added new functions and modified existing ones to handle `BinData` conversion, including `ProcessDollarToBinData`, `GetToTypeAndSubTypeForBinDataConversion`, and `ValidateAndGetBinDataConversionSubTypeAndFormat`.
- Refactored `ParseDollarConvert` and `ApplyDollarConvert` to accommodate the new `BinData` conversion logic.
- Introduced a new struct `ConvertToTypeArguments` to manage conversion arguments.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
|
||
|
|
2c07ff0014 |
Merged PR 1625609: [DocumentDB] Add documentdb version 0.102-1 hotfix that is an idempotent upgrade of 0.102-0
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Bugfix(ish) ### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description 0.102-0 had changes that are non-idempotent. Given there were some incorrect dependencies taken on the 0.102 release (independently) introduce a 0.102-1 version that applies all the delta of 0.102-0 in an idempotent manner so that dependencies taken partially on 0.102 and dependencies taken on 0.102 fully work side-by-side. ---- #### AI description (iteration 1) #### PR Classification Hotfix for DocumentDB version upgrade. #### PR Summary This pull request introduces a hotfix for DocumentDB, ensuring an idempotent upgrade from version 0.102-0 to 0.102-1. - Added `documentdb--0.102-0--0.102-1.sql` to handle partial upgrades and repeat UDF upgrades. - Modified `data_table_utils.c` to check for both 0.102-0 and 0.102-1 versions during data table upgrades. - Updated `pgmongo.control` to set the default version to 1.102-1. - Added `pgmongo--1.102-1--1.103-0.sql` for version transition. - Updated SHA1 checksums in multiple `pgmongo/sql/sha1` files to reflect changes. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
840128724c |
Merged PR 1625449: Fix up issues with shard rebalance grant support
### 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 ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Fix up issues with rebalance grant support - make rebalance_start/stop/status work for the admin user. ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request addresses issues with shard rebalance grant support by updating table ownership and schema usage permissions. - `cluster_operations.c`: Added function to update the owner of the changes table to the cluster admin role and integrated it into the cluster setup process. - `pgmongo--1.102-0--1.103-0.sql`: Granted usage on the `helio_api_distributed` schema to `pgmongo_role` and `helio_admin_role`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
338e1dc6ef |
Merged PR 1622609: [Query Perf] Improve performance of index pushed down large $in queries
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Improve the consistent function performance for $in in the index. ---- #### AI description (iteration 1) #### PR Classification Performance improvement #### PR Summary This pull request improves the performance of index pushed down large `$in` queries by introducing a fast path for certain conditions. - `bson_gin_core.c`: Added a fast path for `$in` queries without truncation, nulls, or regex. - `feature_flag_configs.c`: Introduced a new feature flag `EnableRumInOperatorFastPath`. - Updated regression tests in `regex.sql` and `regex.out` to include scenarios for the new fast path feature. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
580a0a89b6 |
Merged PR 1615448: Version update for 102 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Version update for 102 release |
||
|
|
f31e0b6cad |
Merged PR 1615832: Support for pushdown of in to PFE indexes
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support for pushdown of to PFE indexes ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for pushdown operations to PFE indexes, enhancing query performance and index utilization. - Added new functions in `sql/udfs/index_mgmt/bson_indexbounds_functions--0.102-0.sql` for BSON index bounds operations. - Introduced new operators in `sql/operators/bson_btree_pfe_operators--0.102-0.sql` for BSON and BSON query comparisons. - Updated `src/query/query_operator.c` to handle new index bounds operators and expressions. - Added new type definitions in `sql/types/bsonindexbounds--0.102-0.sql` for BSON index bounds. - Modified `src/metadata/metadata_cache.c` to include OIDs and functions for BSON index bounds types and operators. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
80df5a1509 |
Merged PR 1604750: [perf][creation_time] Alter creation time : part 1
### 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? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Altering creation_time column removing not null and default constraint. ---- #### AI description (iteration 1) #### PR Classification Performance improvement #### PR Summary This pull request alters the `creation_time` column in the database schema to improve performance. - Added `AlterCreationTime` function in `cluster_operations.c` to modify the `creation_time` column. - Updated `SetupCluster` function in `cluster_operations.c` to call `AlterCreationTime`. - Created new SQL scripts `extension_upgrade_alter_creation_time_1.102-0.sql` and `extension_upgrade_alter_creation_time_1.102-0.out` for testing the changes. - Modified multiple test output files to reflect the changes in the `creation_time` column constraints. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |
||
|
|
5a8db3494c |
Merged PR 1614043: [Operator] Support extended $getfield for 8.0
### 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 ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Support new syntax of $getField ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for the extended `$getField` operator for version 8.0. - Added new test file `postgresjs/expression_get_field_80_custom.js` to validate `$getField` operator behavior. - Updated `bson_expression_object_operators.c` to handle new error codes and validation for `$getField`. - Modified `bson_aggregation_object_operators_tests.sql` and related expected output files to include new test cases for `$getField`. - Added new error code mappings in `documentdb_errors.csv` and `error_mappings.csv`. - Updated `documentdb_codes.txt` and `mongo_codes.csv` to include new error codes. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> |