Skip to content

Commit 24c850c

Browse files
authored
fix(base-driver): Support parsing intervals with month|quarter|year granularity (#7561)
1 parent 9a7fd5a commit 24c850c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,10 +2672,10 @@ export class BaseQuery {
26722672
/**
26732673
* @protected
26742674
* @param {string} interval
2675-
* @return {(number|*)[]}
2675+
* @return {[number, string]}
26762676
*/
26772677
parseInterval(interval) {
2678-
const intervalMatch = interval.match(/^(\d+) (second|minute|hour|day|week)s?$/);
2678+
const intervalMatch = interval.match(/^(\d+) (second|minute|hour|day|week|month|quarter|year)s?$/);
26792679
if (!intervalMatch) {
26802680
throw new UserError(`Invalid interval: ${interval}`);
26812681
}

0 commit comments

Comments
 (0)