We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23cf94e commit f8efb14Copy full SHA for f8efb14
packages/cubejs-client-core/test/ResultSet.test.ts
@@ -1807,5 +1807,28 @@ describe('ResultSet', () => {
1807
]
1808
);
1809
});
1810
+
1811
+ test('keeps null values on non-matching rows', () => {
1812
+ const resultSet = new ResultSet({
1813
+ query: {
1814
+ dimensions: [
1815
+ 'User.name',
1816
+ 'Friend.name'
1817
+ ],
1818
+ },
1819
+ data: [
1820
+ {
1821
+ 'User.name': 'Bob',
1822
+ 'Friend.name': null,
1823
+ }
1824
1825
+ } as any);
1826
1827
+ expect(resultSet.tablePivot()).toEqual(
1828
+ [
1829
+ { 'User.name': 'Alice', 'Friend.name': null },
1830
+ ]
1831
+ );
1832
+ });
1833
1834
0 commit comments