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

Commit a1f5fba

Browse files
committed
Math.round causes overflow in timegroups, we should ceil instead
1 parent 30c3a67 commit a1f5fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bigquery_query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ export default class BigQueryQuery {
693693
const seconds =
694694
(this.templateSrv.timeRange.to._d - this.templateSrv.timeRange.from._d) /
695695
1000;
696-
return Math.round(seconds / options.maxDataPoints) + "s";
696+
return Math.ceil(seconds / options.maxDataPoints) + "s";
697697
}
698698
private _getDateRangePart(part) {
699699
if (this.target.timeColumnType === "DATE") {

0 commit comments

Comments
 (0)