-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[0.9.5-nightly] COUNT() not working with field in WHERE clause #4701
Comments
@benbjohnson related to the QE refactor? |
@beckettsean The QE refactor is still in a branch so it won't affect anything coming out of |
@ivanscattergood -- do you see this issue with 0.9.4.2? |
It works fine in 0.9.4.2 ---- otoolep wrote ---- @ivanscattergoodhttps://github.com/ivanscattergood -- do you see this issue with 0.9.4.2? Reply to this email directly or view it on GitHubhttps://github.com//issues/4701#issuecomment-155225753. |
I upgraded to 0.9.5 nightly yesterday, and I got exactly same error. |
I am unable to replicate this. > create database mydb
> insert metric,Type=Event value=101
> Select value from metric WHERE Type = 'Event' AND TIME > now() - 1d limit 1
name: metric
------------
time value
1447348895184066731 101
> Select count(value) from metric WHERE Type = 'Event' AND TIME > now() - 1d
name: metric
------------
time count
1447262513434782993 1 Can you show me a |
Using populated database (
|
Also cannot repro with latest
@ivanscattergood can you give @xvtom can you give any output to show the issue happening for you, too? It would really help to have more than one repro case to attempt. |
Here’s the output requested:
|
Thanks for the output, @ivanscattergood. I notice there's a field in the |
Yep, it's the field in the
|
Does not exist in 0.9.4.2:
|
@ivanscattergood -- does adding
|
We believe this issue is now fixed in master and will be in 0.9.5-rc2. |
Not fixed, still incorrectly reports zero when there are matching points:
The last value should be 3, not zero. It's incorrectly reporting no matching points, but the previous query shows there are matching points, as long as there's no |
OK, looks like I might have fixed the wrong bug. Taking a look now. |
I believe this is fixed by #4789 |
This change ensures that if there are any fields in the WHERE clause of an aggregate that are different from the fields in the SELECT clause, that the cursors also decode those fields. Otherwise WHERE clauses of the form 'SELECT f(w) FROM x WHERE y=z' will return incorrect results Fixes issue #4701.
This change ensures that if there are any fields in the WHERE clause of an aggregate that are different from the fields in the SELECT clause, that the cursors also decode those fields. Otherwise WHERE clauses of the form 'SELECT f(w) FROM x WHERE y=z' will return incorrect results Fixes issue #4701. Conflicts: CHANGELOG.md
Fixed and cherry-picked to 0.9.5. |
Hi,
I have been using the influxdb-0.9.5_nightly_9633410-1.x86_64 for the last week to record data and the count aggregate function is not working as expected. I have just upgraded to 0.9.5-nightly-ef84e33 and the problem remains. I have one measurement metric with one field value.
I have several tags (e.g. Type & "Managed Entity"). If I do a query to show the values added in the last day for value I get a list. (limited to 1 for brevity here):
HOWEVER if I do a count then I get null:
The text was updated successfully, but these errors were encountered: