Commit Graph
8 Commits
Author SHA1 Message Date
Deepak Bisht 19c65dd504 Merged PR 1712186: [SQL] update coments for all SQL upgrade files
### Does this PR have any customer impact?
No

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

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

All the previous version SQL changes should be merged into this PR so that we can update the hashes in this PR

----
#### AI description  (iteration 1)
#### PR Classification
This PR is a documentation update that cleans up inline SQL comments to align with the latest contributing guidelines.

#### PR Summary
The changes refine the SQL file comments for geospatial operator classes and functions by removing outdated references to Mongo indexing and validations.
- `oss/pg_documentdb/sql/operators/bson_gist_geospatial_op_classes--0.16-0.sql`: Updated comments by replacing "mongo 2d index options" and "mongo 2dsphjere index options" with simplified descriptions.
- `oss/pg_documentdb/sql/udfs/geospatial/bson_gist_extensibility_functions--0.16-0.sql` and `oss/pg_documentdb/sql/udfs/geospatial/bson_gist_extensibility_functions--latest.sql`: Revised function comments to remove "mongo db validations" for a more general description of geometry validations.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

Related work items: #4354111
2025-07-09 18:56:11 +08:00
Cornelius Boateng 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
2025-05-29 12:12:31 +08:00
Vinod Sridharan 5ad889feeb Merged PR 1629302: [Composite POC] Fix up operators and type bracketing
### 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?

### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description
1) Fix up the remaining operators - implementations are sub-optimal
2) Add type bracketing options for all types and use them in operators
3) Add support for truncation of terms

TODO:
- Support recheck on the index for operators than just bounds
- Support N boundaries for index terms.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix

#### PR Summary
This pull request addresses issues with operators and type bracketing in BSON composite indexes.
- Added `bson_gin_index_types_core.c` to manage BSON type bounds for indexes.
- Updated `bson_gin_composite_entrypoint.c` to fix operator handling and apply type bracketing for various BSON index strategies.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-04-10 10:29:08 -06:00
Vinod Sridharan db6a3de7fd Merged PR 1627378: [Composite POC] Create single composite operator class
### 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
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description
As part of testing out the composite operator classes, introduce a new composite operator class for Bson. This will be behind a test only GUC and will be for testing composite index pushdown.

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

#### PR Summary
This pull request introduces a new composite operator class for BSON GIN indexes in PostgreSQL.
- Added `bson_gin_composite_entrypoint.c` to implement GIN operator functions for BSON composite indexes.
- Created test cases in `bson_composite_index_tests_insert_terms.out` to validate term generation for composite paths.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-04-07 11:39:49 +08:00
Zinan Ren cfa58dc293 Merged PR 1552326: [OSS] Move pre_consistent back to helio and remove from documentdb schema
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Bugfix
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No
### 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 pre_consistent back to helio and remove from documentdb schema

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

#### PR Summary
This pull request moves the `pre_consistent` function back to the `helio` schema and removes it from the `documentdb` schema.
- `pgmongo/sql/pgmongo--1.4-0--1.4-1.sql`: Updated includes to reference `pg_helio_api` instead of `pg_documentdb`.
- `oss/pg_documentdb/sql/documentdb--0.24-0.sql`: Removed includes for `index_operator_classes_preconsistent` files.
2025-01-15 22:16:33 +00:00
Zinan Ren 4e093b2c9d Merged PR 1545484: [OSS] Porting udfs into documentdb - part 2
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Porting udfs into documentdb

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup and feature enhancement.

#### PR Summary
This pull request continues the porting of UDFs into DocumentDB, updating and including various SQL files for better functionality and organization.
- Updated `documentdb--0.24-0.sql` to include new UDFs and operators, replacing old function references.
- Added new UDFs for query, projection, geospatial, aggregation, metadata, schema management, index management, CRUD commands, user management, schema validation, telemetry, TTL, vector search, extension version, diagnostic, and RBAC metadata.
- Removed outdated function definitions and replaced them with updated SQL includes.
2025-01-15 07:48:41 +00:00
Zinan Ren 47ec4231ba Merged PR 1543189: [OSS] Porting type/operator/schema into documentdb - part 1
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Start porting schemas for documentdb api.
Introducing API_SCHEMA_NAME_V2, API_SCHEMA_INTERNAL_NAME_V2, API_CATALOG_SCHEMA_NAME_V2

----
#### AI description  (iteration 1)
#### PR Classification
Porting type/operator/schema into documentdb.

#### PR Summary
This pull request ports various types, operators, and schemas into documentdb as part of an ongoing effort.
- `pg_documentdb/sql/documentdb--0.24-0.sql`: Created multiple schemas and included various SQL files for query functions, operators, and metadata.
- `pg_documentdb/sql/operators/bson_dollar_operators--0.16-0.sql`: Updated operator definitions to use `__API_SCHEMA_INTERNAL_V2__`.
- `pgmongo/sql/operators/bson_dollar_negation_operators--1.15-1.sql` and `pg_documentdb/sql/operators/bson_dollar_negation_operators--0.16-0.sql`: Changed operator definitions to use `__API_SCHEMA_INTERNAL_V2__`.
- `Makefile.cflags`: Added checks for new schema variables `API_SCHEMA_NAME_V2`, `API_SCHEMA_INTERNAL_NAME_V2`, and `API_CATALOG_SCHEMA_NAME_V2`.
- `pg_documentdb/sql/schema/unique_shard_path_operator_class--0.24-0.sql`: Updated operator class definitions to use `__API_SCHEMA_INTERNAL_V2__`.
2025-01-15 07:48:40 +00:00
Zinan Ren 1f110c4fe3 Merged PR 1542804: [OSS] Move type/operator/schema files from pg_helio_api -> pg_documentdb
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Move type/operator/schema files from pg_helio_api -> pg_documentdb
Except udf files

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

#### PR Summary
This pull request moves type, operator, and schema files from the `pg_helio_api` directory to the `pg_documentdb` directory.
- Updated SQL include paths in multiple `pg_helio_api` SQL files to reference `pg_documentdb` directory.
- Modified `pgmongo` SQL files to include paths from `pg_documentdb` instead of `pg_helio_api`.
- Adjusted `validate_helio_extension_state.sh` script to account for new file paths.
- Updated `Makefile` in `pg_helio_api` to include the new directory structure.
- Changed include paths in `pg_documentdb_distributed` and `pg_helio_distributed` C source files to reflect the new directory structure.
2025-01-15 07:48:40 +00:00