Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 7195e8d

Browse files
authored
Merge pull request #49 from doitintl/avivl/isse-48
Fixes #48
2 parents 8f44342 + a860c68 commit 7195e8d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

dist/module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33655,7 +33655,7 @@ function () {
3365533655
};
3365633656

3365733657
BigQueryQuery._getInterval = function (q, alias) {
33658-
var res = alias ? q.match(/(.*\$__timeGroupAlias\(([\w_]+,)).*?(?=\))/g) : q.match(/(.*\$__timeGroup\(([\w_]+,)).*?(?=\))/g);
33658+
var res = alias ? q.match(/(.*\$__timeGroupAlias\(([\w._]+,)).*?(?=\))/g) : q.match(/(.*\$__timeGroup\(([\w_.]+,)).*?(?=\))/g);
3365933659

3366033660
if (res) {
3366133661
res = res[0].substr(1 + res[0].lastIndexOf(","));
@@ -34035,9 +34035,9 @@ function () {
3403534035
var intervalStr = BigQueryQuery._getIntervalStr(interval, this.target.timeColumn);
3403634036

3403734037
if (alias) {
34038-
return q.replace(/\$__timeGroupAlias\(([\w_]+,+[\w_]+\))/g, intervalStr);
34038+
return q.replace(/\$__timeGroupAlias\(([\w_.]+,+[\w_]+\))/g, intervalStr);
3403934039
} else {
34040-
return q.replace(/\$__timeGroup\(([\w_]+,+[\w_]+\))/g, intervalStr);
34040+
return q.replace(/\$__timeGroup\(([\w_.]+,+[\w_]+\))/g, intervalStr);
3404134041
}
3404234042
};
3404334043

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bigquery_query.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export default class BigQueryQuery {
2727

2828
public static _getInterval(q, alias: boolean) {
2929
let res = alias
30-
? q.match(/(.*\$__timeGroupAlias\(([\w_]+,)).*?(?=\))/g)
31-
: q.match(/(.*\$__timeGroup\(([\w_]+,)).*?(?=\))/g);
30+
? q.match(/(.*\$__timeGroupAlias\(([\w._]+,)).*?(?=\))/g)
31+
: q.match(/(.*\$__timeGroup\(([\w_.]+,)).*?(?=\))/g);
3232
if (res) {
3333
res = res[0].substr(1 + res[0].lastIndexOf(","));
3434
}
@@ -500,9 +500,9 @@ export default class BigQueryQuery {
500500
this.target.timeColumn
501501
);
502502
if (alias) {
503-
return q.replace(/\$__timeGroupAlias\(([\w_]+,+[\w_]+\))/g, intervalStr);
503+
return q.replace(/\$__timeGroupAlias\(([\w_.]+,+[\w_]+\))/g, intervalStr);
504504
} else {
505-
return q.replace(/\$__timeGroup\(([\w_]+,+[\w_]+\))/g, intervalStr);
505+
return q.replace(/\$__timeGroup\(([\w_.]+,+[\w_]+\))/g, intervalStr);
506506
}
507507
}
508508
}

0 commit comments

Comments
 (0)