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

Fix where filters when a tag and a field are combined with OR #6019

Merged
merged 1 commit into from
Mar 22, 2016

Conversation

jsternberg
Copy link
Contributor

Fixes #5152.

@jsternberg jsternberg force-pushed the js-5152-fix-where-with-field-and-tag branch from 98ddacd to e38b326 Compare March 15, 2016 20:55
@jsternberg jsternberg added this to the 0.12.0 milestone Mar 15, 2016
@jsternberg jsternberg force-pushed the js-5152-fix-where-with-field-and-tag branch from e38b326 to 3d2d81f Compare March 15, 2016 21:09
@jwilder
Copy link
Contributor

jwilder commented Mar 22, 2016

LGTM 👍

If an OR was used, merging filters between different expressions would
not work correctly. If one of the sides had a set of series ids with a
condition and the other side had no series ids associated with the
expression, all of the series from the side with a condition would have
the condition ignored. Instead of defaulting a non-existant series
filter to true, it should just be false and the evaluation of the one
side that does exist should take care of determining if the series id
should be included or not. The AND condition used false correctly so did
not have to be changed.

If a tag did not exist and `!=` or `!~` were used, it would return false
even though the neither a field or a tag equaled those values. This has
now been modified to correctly return the correct series ids and the
correct condition.

Also fixed a panic that would occur when a tag caused a field access to
become unnecessary. The filter using the field access still got created
and used even though it was unnecessary, resulting in an attempted
access to a non-initialized map.

Fixes #5152 and a bunch of other miscellaneous issues.
@jsternberg jsternberg force-pushed the js-5152-fix-where-with-field-and-tag branch from 3d2d81f to a35d960 Compare March 22, 2016 16:19
@jsternberg jsternberg changed the title Fix where filters when a tag and a filter are combined with OR Fix where filters when a tag and a field are combined with OR Mar 22, 2016
jsternberg added a commit that referenced this pull request Mar 22, 2016
…-and-tag

Fix where filters when a tag and a field are combined with OR
@jsternberg jsternberg merged commit 9620130 into master Mar 22, 2016
@jsternberg jsternberg deleted the js-5152-fix-where-with-field-and-tag branch March 22, 2016 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants