Skip to content
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

bug: fill(previous) and multiplication operator result in squaring coefficient #6911

Closed
apetryk2 opened this issue Jun 25, 2016 · 0 comments
Closed
Assignees
Milestone

Comments

@apetryk2
Copy link

apetryk2 commented Jun 25, 2016

Bug report

influxdb 1.0.0-beta2
OS: windows 10

Steps to reproduce:

  1. Create the following dummy data in a measurement:
measurement value=0 1420070401000000000
measurement value=15 1420070431000000000
measurement value=0 1420070521000000000
  1. Execute the following query to see things look ok:
> select "value" from "measurement" where time > '2015-01-01T00:00:00Z'
2015-01-01T00:00:01Z    0
2015-01-01T00:00:31Z    15
2015-01-01T00:02:01Z    0
  1. Execute the following query to see that regular group by of mean looks ok
> select mean("value") from "measurement" where time > '2015-01-01T00:00:00Z' and time < '2015-01-01T00:03:00Z' group by time(30s) fill(previous)
2015-01-01T00:00:00Z    0
2015-01-01T00:00:30Z    15
2015-01-01T00:01:00Z    15
2015-01-01T00:01:30Z    15
2015-01-01T00:02:00Z    0
2015-01-01T00:02:30Z    0
  1. Multiply the mean by 4. We observe that on data points where the fill(previous) is being applied the coeficient for multiplication is increasing to 4^2.
> select 4*mean("value") from "measurement" where time > '2015-01-01T00:00:00Z' and time < '2015-01-01T00:03:00Z' group by time(30s) fill(previous)
2015-01-01T00:00:00Z    0
2015-01-01T00:00:30Z    60
2015-01-01T00:01:00Z    240   <-   this value should also be 60, no?
2015-01-01T00:01:30Z    240  <-    ditto.
2015-01-01T00:02:00Z    0
2015-01-01T00:02:30Z    0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants