@cubejs-client/core 1.3.49 → 1.3.50

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.
@@ -621,7 +621,7 @@ export default class ResultSet {
621
621
  return this.pivot(normalizedPivotConfig).map(({ xValues, yValuesArray }) => fromPairs([
622
622
  ...(normalizedPivotConfig.x).map((key, index) => [
623
623
  key,
624
- xValues[index] ?? ''
624
+ xValues[index]
625
625
  ]),
626
626
  ...(isMeasuresPresent
627
627
  ? yValuesArray.map(([yValues, measure]) => [
@@ -1721,5 +1721,24 @@ describe('ResultSet', () => {
1721
1721
  { xValues: [0], yValuesArray: [[['User.total'], 10]] },
1722
1722
  ]);
1723
1723
  });
1724
+ test('keeps null values on non-matching rows', () => {
1725
+ const resultSet = new ResultSet({
1726
+ query: {
1727
+ dimensions: [
1728
+ 'User.name',
1729
+ 'Friend.name'
1730
+ ],
1731
+ },
1732
+ data: [
1733
+ {
1734
+ 'User.name': 'Bob',
1735
+ 'Friend.name': null,
1736
+ }
1737
+ ],
1738
+ });
1739
+ expect(resultSet.tablePivot()).toEqual([
1740
+ { 'User.name': 'Bob', 'Friend.name': null },
1741
+ ]);
1742
+ });
1724
1743
  });
1725
1744
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubejs-client/core",
3
- "version": "1.3.49",
3
+ "version": "1.3.50",
4
4
  "engines": {},
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "license": "MIT",
40
40
  "devDependencies": {
41
- "@cubejs-backend/linter": "1.3.49",
41
+ "@cubejs-backend/linter": "1.3.50",
42
42
  "@types/jest": "^29",
43
43
  "@types/moment-range": "^4.0.0",
44
44
  "@types/ramda": "^0.27.34",
@@ -50,5 +50,5 @@
50
50
  "eslintConfig": {
51
51
  "extends": "../cubejs-linter"
52
52
  },
53
- "gitHead": "050dfe3fa2fb987039e867d4098cb461a93e0ee3"
53
+ "gitHead": "3dcaa00924248b2b90613fcf2b7607a205db5a7f"
54
54
  }