@azure/cosmos 3.16.1 → 3.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History
2
2
 
3
+ ## 3.16.2 (2022-06-24)
4
+
5
+ ### Bugs Fixed
6
+ - Added support to run queries with group by over a column with null values. [#22345](https://github.com/Azure/azure-sdk-for-js/pull/22345)
7
+
3
8
  ## 3.16.1 (2022-05-31)
4
9
 
5
10
  ### Bugs Fixed
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ const Constants = {
176
176
  ThrottleRetryWaitTimeInMs: "x-ms-throttle-retry-wait-time-ms",
177
177
  CurrentVersion: "2020-07-15",
178
178
  SDKName: "azure-cosmos-js",
179
- SDKVersion: "3.16.1",
179
+ SDKVersion: "3.16.2",
180
180
  Quota: {
181
181
  CollectionSize: "collectionSize",
182
182
  },
@@ -3776,7 +3776,11 @@ class GroupByEndpointComponent {
3776
3776
  if (aggregators) {
3777
3777
  // Iterator over all results in the payload
3778
3778
  Object.keys(payload).map((key) => {
3779
- const aggregateResult = extractAggregateResult(payload[key]);
3779
+ // in case the value of a group is null make sure we create a dummy payload with item2==null
3780
+ const effectiveGroupByValue = payload[key]
3781
+ ? payload[key]
3782
+ : new Map().set("item2", null);
3783
+ const aggregateResult = extractAggregateResult(effectiveGroupByValue);
3780
3784
  aggregators.get(key).aggregate(aggregateResult);
3781
3785
  });
3782
3786
  }