Files
documentdb/pg_documentdb
Duan Pei ab6770f92e Merged PR 1537653: [Fix Jstest] fix jstest_server6238
### 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

the PR to fix some cases of jstests/core/server6238.js, ![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1537653/attachments/image.png)

15 line of case cannot be fixed yet, because `$a` is not a operator, in group stage should report `InvalidPipelineOperator`, in project stage, should report error code `31325`  .  so to fix the case, we need to distinguish the group stage and the project stage in ParseAggregationExpressionData Function.

fix some cases of  jstest.
when field is start with "$", ErrorCode should is 16410.
example:
```
db.coll1.aggregate([
    {
        $project: {
            $a: "$a"
        }
    }
]);
```

when field is invalidOperator, ErrorCode should is 40236
```
db.jstest1.aggregate([
    {
        $group: {
            _id: "$_id",
            $a: {
                $sum: 1
            }
        }
    }
]);
```

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

#### PR Summary
This pull request addresses a bug in the jstest_server by adding a new error code and updating related error handling logic.
- `helio_conversion_codes.c`: Added handling for `ERRCODE_HELIO_LOCATION40236`.
- `bson_tree.c` and `bson_io.c`: Updated error codes to use `ERRCODE_HELIO_LOCATION40236`.
- `helio_errors.h`, `helio_codes.txt`, `helioerrors.csv`, `mongoerrors.csv`, and `mongo_codes.csv`: Added definitions and entries for `ERRCODE_HELIO_LOCATION40236`.
2025-01-15 07:48:41 +00:00
..