-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL: __unixEpochGroup to support arithmetic expression as argument #46764
Conversation
Following call generates wrong expression : $__unixEpochGroupAlias(height+42,$__interval) => floor(height+42/60)*60 AS "time" instead of => floor((height+42)/60)*60 AS "time"
Hi @s0nik42, |
@zoltanbedi sure, just not familiar doing that, can you point me to the test file? I will do the modification |
@s0nik42 I'd change this line https://github.com/grafana/grafana/blob/main/pkg/tsdb/postgres/macros_test.go#L140 |
@zoltanbedi made the change hope I did it well. One question for my future commit how can I run a specific test to verify everything works before committing ? |
|
Thank you @s0nik42! |
Following macro call generates wrong expression :
$__unixEpochGroupAlias(height+42,$__interval)
=> floor(height+42/60)*60 AS "time"
instead of
=> floor((height+42)/60)*60 AS "time"
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: