mirror of
https://github.com/grafana/grafana.git
synced 2025-09-24 06:46:15 +08:00
Postgres: Fix time group macro when TimescaleDB is enabled and interval is less than a second (#33153)
Fixing a special case with time group macro when using TimescaleDB and interval is lower than a second. Fixes #33124
This commit is contained in:

committed by
GitHub

parent
23c7e7ab60
commit
dd0ba96d7c
@ -109,7 +109,7 @@ func (m *postgresMacroEngine) evaluateMacro(name string, args []string) (string,
|
||||
}
|
||||
|
||||
if m.timescaledb {
|
||||
return fmt.Sprintf("time_bucket('%.0fs',%s)", interval.Seconds(), args[0]), nil
|
||||
return fmt.Sprintf("time_bucket('%.1fs',%s)", interval.Seconds(), args[0]), nil
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
|
Reference in New Issue
Block a user