console: ensure we fill missing values including the last one

BETWEEN is inclusive, while FILL excludes the upper bound. This may
trigger a subtle bug where sometimes, one axis has one value the other
does not have.
This commit is contained in:
Vincent Bernat
2022-08-09 19:16:16 +02:00
parent 0208c34180
commit 8e755ae0e1
4 changed files with 13 additions and 13 deletions

View File

@@ -83,7 +83,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -108,7 +108,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}
`,
@@ -134,7 +134,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -159,7 +159,7 @@ WHERE {{ .Timefilter }} AND (DstCountry = 'FR' AND SrcCountry = 'US')
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -184,7 +184,7 @@ WHERE {{ .Timefilter }} AND (InIfDescription = '{{"{{"}} hello }}' AND SrcCountr
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -213,7 +213,7 @@ WHERE {{ .Timefilter }} AND (DstCountry = 'FR' AND SrcCountry = 'US')
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}
UNION ALL
@@ -228,7 +228,7 @@ WHERE {{ .Timefilter }} AND (SrcCountry = 'FR' AND DstCountry = 'US')
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -259,7 +259,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
}, {
@@ -291,7 +291,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}
UNION ALL
@@ -306,7 +306,7 @@ WHERE {{ .Timefilter }}
GROUP BY time, dimensions
ORDER BY time WITH FILL
FROM {{ .TimefilterStart }}
TO {{ .TimefilterEnd }}
TO {{ .TimefilterEnd }} + INTERVAL 1 second
STEP {{ .Interval }})
{{ end }}`,
},