16 Commits
Author SHA1 Message Date
Vinod Sridharan 739bdfb1aa Merged PR 1780627: A few API changes & RUM changes for performance
### Does this PR have any customer impact?
Yes

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

### 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
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description

1) Port a few more changes into the public documentdb_rum to reduce diff to internal RUM
2) Add more inlining of computation of RumItem from the pages (behind a GUC defaulted on)
3) Add option for bson_build_document and fix bson_get_value_text to not quote strings unnecessarily to be compatible with `::text` casts

----
#### AI description  (iteration 1)
#### PR Classification
This PR implements API updates and performance improvements by introducing a new item pointer decoding mechanism in RUM indexes and extending BSON UDF functionalities.

#### PR Summary
The pull request refactors core RUM index scan routines and enhances BSON API functions to improve performance and API consistency. Key changes include:
- **`oss/internal/pg_documentdb_extended_rum` and `pgmongo_rum`**: Introduced new macros and inline functions (e.g., `decode_varbyte_blocknumber`, `rumDataPageLeafReadWithBlockNumberIncr`) along with the boolean flag `RumUseNewItemPtrDecoding` to optimize item pointer decoding.
- **`rumget.c`, `rumentrypage.c`, and `rumdatapage.c`**: Updated the posting tree scan logic to conditionally apply the new decoding approach, streamlining data page processing.
- **`pg_documentdb_core/sql/udfs/bson_io`**: Added new BSON UDFs (such as `bson_build_document`) and overloads (e.g., a three-argument version of `bson_get_value_text`) to expand API capabilities.
- **`pgbson.c` and `bson_io.c`**: Enhanced BSON logging functions with optional quoting support for JSON conversion, improving logging clarity and consistency.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-08-25 11:39:17 +08:00
CosmosDB Build Service (msdata) 72fb39d9a9 Merged PR 1775074: [tagv.1.108] Update extension version for new release 1.108
This PR updates the extension version for the new release 1.108.

Changes included:
- Control files updated to version 1.107-0
- SQL files generated for version upgrades
- Release notes file created for version 1.108
- TOC.yml updated with new release notes entry
- CHANGELOG.md updated with new version entry
2025-08-21 20:14:39 +08:00
CosmosDB Build Service (msdata) c02db96c0c Merged PR 1750749: [tagv.1.107] Update extension version for new release 1.107
This PR updates the extension version for the new release 1.107.

Changes included:
- Control files updated to version 1.106-0
- SQL files generated for version upgrades
- Release notes file created for version 1.107
- TOC.yml updated with new release notes entry
- CHANGELOG.md updated with new version entry
2025-08-07 11:14:08 +08:00
CosmosDB Build Service (msdata) 7c62c43e51 Merged PR 1720001: Update extension version for new release 1.106
This PR updates the extension version for the new release 0.106.

Changes included:
- Control files updated to new version
- SQL files generated for version upgrades
- CHANGELOG.md updated with new version entry
2025-07-09 18:56:11 +08:00
Manish Gaur 2c5ab611d7 Merged PR 1692296: Version update for 104
### 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 104

Related work items: #4281831
2025-06-05 10:31:32 +08:00
Manish Gaur 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
2025-04-30 14:57:09 +08:00
Vinod Sridharan 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 -->
2025-04-07 11:39:49 +08:00
Manish Gaur 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
2025-03-26 12:19:42 +08:00
Javier Figueroa 1ce14b116c Merged PR 1572551: Updating schema to release 1.101
### Does this PR have any customer impact?
No

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

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

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

### Description
Updating schema to release 1.101

----
#### AI description  (iteration 1)
#### PR Classification
Schema update for new release version.

#### PR Summary
This pull request updates the schema to release version 1.101, including version bumps and minor SQL adjustments.
- Updated `default_version` in `documentdb_distributed.control`, `documentdb.control`, and `documentdb_core.control` to `0.102-0`.
- Updated `default_version` in `pgmongo.control` to `1.101-0`.
- Added new SQL file `pgmongo--1.101-0--1.102-0.sql` with search path settings.
- Updated SHA1 checksums for various `pgmongo` SQL files.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-02-10 14:08:55 -08:00
Deepak Bisht 146c434041 Merged PR 1562390: Snap 0.101 branch for OSS, 0.100 is already released
### Does this PR have any customer impact?
No

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

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

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

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

### Description
Snap 0.101 branch for OSS, 0.100 is already released and can no longer accept changes in schema

----
#### AI description  (iteration 1)
#### PR Classification
Version update.

#### PR Summary
This pull request updates the version number for the DocumentDB API and core API surface for PostgreSQL.
- `oss/pg_documentdb/documentdb.control`: Updated `default_version` to '0.101-0'.
- `oss/pg_documentdb_core/documentdb_core.control`: Updated `default_version` to '0.101-0'.
2025-01-30 10:35:08 -08:00
Manish Gaur f0f220023f Merged PR 1553968: version update 1.24
### 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

version update 1.24

----
#### AI description  (iteration 1)
#### PR Classification
Version update

#### PR Summary
This pull request updates the version numbers for various modules and adds corresponding SQL migration files.
- Updated version numbers in `.control` files for `pg_helio_api`, `pg_helio_core`, `pg_helio_distributed`, `pg_documentdb`, `pg_documentdb_core`, and `pgmongo`.
- Added new SQL migration files for version updates in `pg_helio_api`, `pg_helio_core`, `pg_helio_distributed`, `pg_documentdb`, `pg_documentdb_core`, and `pgmongo`.
- Moved release notes file from `pgmongo_1.25.md` to `pgmongo_1.100.md`.
- Updated `toc.yml` to include the new release notes for `pgmongo 1.100`.
2025-01-17 18:38:20 +00:00
Vinod Sridharan b706079601 Merged PR 1542864: [OSS] Finish up migration of schema from helio_core -> Documentdb_Core
### 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)
Yes

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

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

### Description
Finish up schema migration for documentdb_core

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup

#### PR Summary
This pull request finalizes the migration of schema from `helio_core` to `Documentdb_Core`.
- Updated function definitions in `oss/pg_documentdb_core/sql/udfs/bson_io/bson_io--0.11-0.sql` to use `__CORE_SCHEMA__`.
- Updated function definitions in `oss/pg_documentdb_core/sql/udfs/bson_btree/bson_btree--0.19-0.sql` to use `__CORE_SCHEMA__`.
- Updated function definitions in `oss/pg_documentdb_core/sql/udfs/bsonsequence_io/bsonsequence_io--0.10-0.sql` to use `__CORE_SCHEMA__`.
- Removed `set search_path` statements from `oss/pg_documentdb_core/sql/documentdb_core--0.24-0.sql`.
- Updated function definitions in `oss/pg_documentdb_core/sql/udfs/bson_hash/bson_hash_functions--0.15-0.sql` to use `__CORE_SCHEMA__`.
2025-01-15 07:48:40 +00:00
Vinod Sridharan f0722edc50 Merged PR 1542411: [OSS] Start porting Schemas into documentdb_core
### 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)
Yes

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Start porting schemas for SQL in documentdb_core.
Maintain back-compat by introducing CORE_SCHEMA_v2 to handle cases where the existing logic already depends on there being 2 core schemas

----
#### AI description  (iteration 1)
#### PR Classification
Code refactoring to port schemas into `documentdb_core`.

#### PR Summary
This pull request refactors the code to port BSON type definitions and related functions into `documentdb_core`.
- `pg_helio_core/sql/types/bson--1.10-0.sql`: Replaced BSON type definitions with an include directive.
- Added `pg_documentdb_core/sql/types/bson--0.24-0.sql` and `pg_documentdb_core/sql/types/bson_typanalyze--0.24-0.sql` for BSON type and analysis functions.
- `pg_documentdb_core/sql/documentdb_core--0.24-0.sql`: Created `documentdb_core` schema and included BSON type definitions.
- Updated Makefiles (`Makefile.cflags`, `pg_helio_api/Makefile`, `pg_helio_core/Makefile`, `internal/pg_helio_distributed/Makefile`) to include new schema definitions.
- Updated `postgresql.conf` files to preload `pg_documentdb_core`.
2025-01-15 07:48:40 +00:00
Vinod Sridharan 7d115344e5 Merged PR 1542502: [OSS] move sql files from helio_core -> documentdb_core for schema files
### 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)
Yes

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
move sql files from helio_core -> documentdb_core for schema files

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup

#### PR Summary
This pull request moves SQL files from `helio_core` to `documentdb_core` to better organize schema files.
- Updated includes in `oss/pg_helio_core/sql/pg_helio_core--1.10-0.sql` to reference `pg_documentdb_core` paths.
- Modified `pgmongo/sql/pgmongo--1.14-6--1.15-0.sql` to include files from `pg_documentdb_core` instead of `pg_helio_core`.
- Adjusted `scripts/pipeline_check_sql_upgrades.sh` to validate and check SQL files in `pg_documentdb_core`.
- Updated `oss/pg_helio_core/Makefile` to include `OSS_SRC_DIR` for SQL file processing.
- Changed various `pgmongo/sql` files to reference `pg_documentdb_core` paths for BSON-related operations and schema definitions.
2025-01-15 07:48:40 +00:00
Vinod Sridharan 491b8cd585 Merged PR 1541964: [OSS] Move all GUCs to a neutral prefix
### 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?

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

### Description
- Redo GUCs for helio -> documentdb preserving back-compat for the service.
- Move Docdb version to 1.24 -> 0.24

----
#### AI description  (iteration 1)
#### PR Classification
API change

#### PR Summary
This pull request updates the prefix for all GUCs (Grand Unified Configuration) to a neutral prefix.
- `documentdb_init.c`: Changed GUCs from "helio_api" to a dynamic prefix using `psprintf`.
- `documentdb_distributed_init.c` and `documentdb_distributed.c`: Updated GUCs to use a dynamic prefix.
- `pg_documentdb.c`, `pg_helio_api.c`, and `pgmongo.c`: Modified initialization functions to pass the new GUC prefix.
- `helio_api_init.h` and `helio_distributed_init.h`: Updated function signatures to include the new GUC prefix parameter.
- Updated control files to reflect the new version `0.24-0`.
2025-01-15 07:48:40 +00:00
Zinan Ren 8e7bd960bf Merged PR 1540262: [OSS] Remove helio references from sources of documentdb_core
### 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
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Remove helio from file name
Remove helio references from source content except schema reference
Start local documentdb server with the documentdb extension
Regression tests using the documentdb  extension

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup

#### PR Summary
This pull request removes references to "helio" from the `documentdb_core` source code.
- `scripts/utils.sh`: Renamed variables from `preloadExtensions` to `preloadLibraries`.
- `pg_documentdb_core/include/utils/error_utils.h`: Updated function and macro names to replace "Helio" with "DocumentDB".
- `pg_documentdb_core/include/io/helio_bson_core.h` and `pg_documentdb_core/include/query/helio_bson_compare.h`: Moved to `pg_documentdb_core/include/io/bson_core.h` and `pg_documentdb_core/include/query/bson_compare.h`.
- `pg_documentdb_core/src/collation/collation.c` and `pg_documentdb_core/src/io/pgbson.c`: Replaced error codes and messages to use "DocumentDB" instead of "Helio".
- `scripts/validate_helio_extension_state.sh`: Added exceptions for certain files to skip validation for "helio" references.
2025-01-15 07:48:40 +00:00