-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix where filters when a OR is used and when a tag does not exist
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.
- Loading branch information
1 parent
c5bd96d
commit e38b326
Showing
4 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters