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

Problem about group by & fill(none) #7772

Closed
z1q1q7 opened this issue Dec 29, 2016 · 3 comments
Closed

Problem about group by & fill(none) #7772

z1q1q7 opened this issue Dec 29, 2016 · 3 comments

Comments

@z1q1q7
Copy link

z1q1q7 commented Dec 29, 2016

Bug report

System info: [InfluxDB1.0, CentOS release 6.8]

Steps to reproduce:

Origin data like this:

domain_hcode_detail
time	domain	5xx	total
2016-12-27T15:55:00Z	domain1	3	29229
2016-12-27T15:55:00Z	domain2	52	5711867
2016-12-27T16:00:00Z	domain1		30983
2016-12-27T16:00:00Z	domain2	51	5449863

When I query like this:

SELECT sum("5xx") as "5xx",sum("total")AS total FROM domain_hcode_detail WHERE ( domain='domain1' or domain='domain2' ) and time >= 1482854100s AND time <= 1482854400s GROUP BY domain, time(5m) fill(none)

I got this:

domain_hcode_detail
domain:domain1

time	5xx	total
2016-12-27T15:55:00Z	3	29229
domain_hcode_detail
domain:domain2

time	5xx	total
2016-12-27T15:55:00Z	52	
domain_hcode_detail
domain:domain1

time	5xx	total
2016-12-27T16:00:00Z		30983
domain_hcode_detail
domain:domain2

time	5xx	total
2016-12-27T15:55:00Z		5711867
2016-12-27T16:00:00Z	51	5449863

domain2 2016-12-27T15:55:00Z appear twice.

@desa
Copy link
Contributor

desa commented Dec 29, 2016

@z1q1q7 I cant seem to reproduce this issue

> create database mydb
> use mydb
Using database mydb
> precision s
> insert domain_hcode,domain=domain1 5xx=3,total=29229 1482854100
> insert domain_hcode,domain=domain2 5xx=52,total=5449863 1482854100
> insert domain_hcode,domain=domain1 total=30983 1482854400
> insert domain_hcode,domain=domain2 5xx=51,total=5449863 1482854400
> SELECT sum("5xx") as "5xx",sum("total")AS total FROM domain_hcode WHERE ( domain='domain1' or domain='domain2' ) and time >= 1482854100s AND time <= 1482854400s GROUP BY domain, time(5m) fill(none)
name: domain_hcode
tags: domain=domain1
time       5xx total
----       --- -----
1482854100 3   29229
1482854400     30983

name: domain_hcode
tags: domain=domain2
time       5xx total
----       --- -----
1482854100 52  5.449863e+06
1482854400 51  5.449863e+06

Do you have repro steps?

@z1q1q7
Copy link
Author

z1q1q7 commented Jan 3, 2017

@desa , Sorry for late. I can reproduce as your last post.

My output as follows:

influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 1.0.0
InfluxDB shell version: 1.0.0
> create database mydb
> use mydb
Using database mydb
> precision s
> insert domain_hcode,domain=domain1 5xx=3,total=29229 1482854100
> insert domain_hcode,domain=domain2 5xx=52,total=5449863 1482854100
> insert domain_hcode,domain=domain1 total=30983 1482854400
> insert domain_hcode,domain=domain2 5xx=51,total=5449863 1482854400
> SELECT sum("5xx") as "5xx",sum("total")AS total FROM domain_hcode WHERE ( domain='domain1' or domain='domain2' ) and time >= 1482854100s AND time <= 1482854400s GROUP BY domain, time(5m) fill(none)
name: domain_hcode
tags: domain=domain1
time		5xx	total
----		---	-----
1482854100	3	29229

name: domain_hcode
tags: domain=domain2
time		5xx	total
----		---	-----
1482854100	52

name: domain_hcode
tags: domain=domain1
time		5xx	total
----		---	-----
1482854400		30983

name: domain_hcode
tags: domain=domain2
time		5xx	total
----		---	-----
1482854100		5.449863e+06
1482854400	51	5.449863e+06

Your server version? It's a 1.0.0 bug?

@jwilder
Copy link
Contributor

jwilder commented Jan 4, 2017

I verified this exists in 1.0 and is fixed in 1.1 via #7570. @z1q1q7 if you upgrade to 1.1.1, you'll have the fix. This is a dup of #7564.

@jwilder jwilder closed this as completed Jan 4, 2017
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

3 participants