@cubejs-client/core 0.33.55 → 0.33.58
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/dist/cubejs-client-core.esm.js +1 -1
- package/dist/cubejs-client-core.esm.js.map +1 -1
- package/dist/cubejs-client-core.js +1 -1
- package/dist/cubejs-client-core.js.map +1 -1
- package/dist/cubejs-client-core.umd.js +1 -1
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/ResultSet.js +1 -1
- package/src/tests/drill-down.test.js +33 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-client/core",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.58",
|
|
4
4
|
"engines": {},
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"eslint-plugin-node": "^5.2.1",
|
|
46
46
|
"jest": "^26.0.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "49caef372253236528bcf96b74fbda2447709541"
|
|
49
49
|
}
|
package/src/ResultSet.js
CHANGED
|
@@ -241,6 +241,16 @@ describe('drill down query', () => {
|
|
|
241
241
|
timeDimensions: [],
|
|
242
242
|
})
|
|
243
243
|
);
|
|
244
|
+
const resultSet5 = new ResultSet(
|
|
245
|
+
loadResponse({
|
|
246
|
+
timeDimensions: [
|
|
247
|
+
{
|
|
248
|
+
dimension: 'Orders.ts',
|
|
249
|
+
granularity: 'week',
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
})
|
|
253
|
+
);
|
|
244
254
|
|
|
245
255
|
it('handles a query with a time dimension', () => {
|
|
246
256
|
expect(
|
|
@@ -366,4 +376,27 @@ describe('drill down query', () => {
|
|
|
366
376
|
timezone: 'UTC'
|
|
367
377
|
});
|
|
368
378
|
});
|
|
379
|
+
|
|
380
|
+
it('snap date range to granularity if the date range is not defined in the time dimension', () => {
|
|
381
|
+
expect(
|
|
382
|
+
resultSet5.drillDown({ xValues: ['2020-08-01T00:00:00.000'] })
|
|
383
|
+
).toEqual({
|
|
384
|
+
measures: [],
|
|
385
|
+
segments: [],
|
|
386
|
+
dimensions: ['Orders.id', 'Orders.title'],
|
|
387
|
+
filters: [
|
|
388
|
+
{
|
|
389
|
+
member: 'Orders.count',
|
|
390
|
+
operator: 'measureFilter',
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
timeDimensions: [
|
|
394
|
+
{
|
|
395
|
+
dimension: 'Orders.ts',
|
|
396
|
+
dateRange: ['2020-07-27T00:00:00.000', '2020-08-02T23:59:59.999'],
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
timezone: 'UTC',
|
|
400
|
+
});
|
|
401
|
+
});
|
|
369
402
|
});
|