Commit Graph
5 Commits
Author SHA1 Message Date
Ujjwal Agrawal 37681b511b Merged PR 1493190: Update error codes from pg to helio and add missing sql tests
### Does this PR have any customer impact?

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

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

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

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

### Description

Bug fix to update error codes from Postgres to HelioDB-specific codes. Checking and updating error codes for each command. FerretDB reported bug.

Related work items: #3554201
2024-11-04 17:14:58 +08:00
Shuai Tian f8c366966d Revert "HelioDB Push 2024-10-31" (#76)
Reverts microsoft/heliodb#75, redo the merge instead of squash merge
which discarded the commit history
2024-11-04 14:38:52 +08:00
69edcc3556 HelioDB Push 2024-10-31 (#75)
Co-authored-by: Deepak Pemmaraju <deepakpe@microsoft.com>
Co-authored-by: Cornelius Boateng <cboateng@microsoft.com>
Co-authored-by: Ujjwal Agrawal <uagrawal@microsoft.com>
Co-authored-by: Jia Hu 👻 <jiahu2@microsoft.com>
Co-authored-by: Jayanta Mondal <jmondal@microsoft.com>
Co-authored-by: Vinod Sridharan <visridha@microsoft.com>
2024-10-31 16:09:00 +08:00
Parag Jain f801b9e7a3 Merged PR 1490550: [Bug Fix] $merge bug fix while checking presence of compound index on target collection
### 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
This PR contains 2 fixes
- In $merge `on` field cannot contain duplicate element:    `{ "$merge" :  {"on" : [a,a] }`
- we were missing a case while validating on field against index array.

```
let's say indexSpec :  { "x" : 1, "y" : 1, "z" : 1}
then below cases also expected to be fail as index array has extra element.
 `{ "$merge" :  {"on" : [x,z] }`
 `{ "$merge" :  {"on" : [x,y] }`
```

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

#### PR Summary
Fixes a bug in the `$merge` operation by ensuring proper detection of compound unique indexes and handling duplicate fields.
- `bson_aggregation_output_pipeline.c`: Corrected logic to check for compound unique indexes and added error handling for duplicate fields.
- `bson_aggregation_stage_merge_tests.sql` and related test output files: Added tests to verify the detection of duplicate fields and proper index checking.
- `helio_conversion_codes.c`: Added a new error code for duplicate field detection.
- Updated error code mappings in `mongoerrors.csv`, `helioerrors.csv`, `helio_codes.txt`, and `mongo_codes.csv`.
2024-10-25 09:11:39 +03:00
Vinod Sridharan 9cc8055eff Merged PR 1474463: [OSS] Split error mapping for Helio and wire protocols
### 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
Move Error map reference into a helio and mongo set of values. This splits error mapping to helio and error for other implementations like mongo wire protocol.

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

#### PR Summary
This pull request moves the error map reference to a generated folder, cleaning up the source directory.
- Removed Mongo error code definitions from `oss/pg_helio_core/include/utils/helio_errors.h`.
- Added `oss/pg_helio_core/generated/include/utils/helio_error_conversion.h` with Mongo error code definitions.
- Updated `oss/scripts/generate_error_values.sh` to handle the new generated header file.
- Moved `oss/pg_helio_core/src/utils/helio_errors.c` to `oss/pg_helio_core/generated/src/utils/helio_error_conversion.c`.
- Updated `pgmongo/Makefile` to include the new generated directory in the build process.

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

#### PR Summary
This pull request moves the error map reference to a generated folder, separating it from the source directory.
- `oss/pg_helio_core/include/utils/helio_errors.h`: Removed Mongo error code definitions.
- `oss/pg_helio_core/generated/include/utils/helio_error_conversion.h`: Added new file for Mongo error code definitions.
- `oss/scripts/generate_error_values.sh`: Updated script to generate new header and source files for error conversion.
- `pgmongo/Makefile`: Updated include paths to reference the new generated directory.
- Moved `oss/pg_helio_core/src/utils/helio_errors.c` to `oss/pg_helio_core/generated/src/utils/helio_error_conversion.c` without code changes.
2024-10-03 10:48:48 +03:00