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 tag NEQ #2105

Merged
merged 4 commits into from
Mar 31, 2015
Merged

Fix tag NEQ #2105

merged 4 commits into from
Mar 31, 2015

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Mar 28, 2015

No description provided.

@@ -1188,7 +1193,6 @@ func TestSingleServer(t *testing.T) {
nodes := createCombinedNodeCluster(t, testName, dir, 1, 8090, nil)

runTestsData(t, testName, nodes, "mydb", "myrp")
runTest_rawDataReturnsInOrder(t, testName, nodes, "mydb", "myrp")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously this will not be part of the final commit, just to speed up my testing.

@otoolep
Copy link
Contributor Author

otoolep commented Mar 30, 2015

Fix issue #2097.

@otoolep otoolep force-pushed the fix_tag_neq branch 2 times, most recently from b154b0a to 53d17a6 Compare March 30, 2015 23:11
@otoolep
Copy link
Contributor Author

otoolep commented Mar 30, 2015

@pauldix @dgnorton

@toddboom
Copy link
Contributor

lgtm

expected: `{"results":[{}]}`,
},
{
reset: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an explicit reset-and-write here, since this test is subtle. I thought it was worth making it explicit.

@dgnorton
Copy link
Contributor

@otoolep I made the same mistake in the NEQREGEX I added to idsForExpr. Can you fix that also in this PR since it's related?

@otoolep otoolep force-pushed the fix_tag_neq branch 5 times, most recently from 524dfab to aef724a Compare March 31, 2015 22:56
otoolep and others added 4 commits March 31, 2015 16:14
If so, then return all series IDs which do not match.

Fix for issue #2097
Series that do not have any tags are considered matching in the NEQREGEX
case so the must be explicitly added.
@otoolep
Copy link
Contributor Author

otoolep commented Mar 31, 2015

+1 from @dgnorton

otoolep added a commit that referenced this pull request Mar 31, 2015
@otoolep otoolep merged commit 3eb0b04 into master Mar 31, 2015
if n.Op == influxql.NEQREGEX {
ids = m.seriesIDs
}

for k := range tagVals {
match := re.Val.MatchString(k)

if (match && n.Op == influxql.EQREGEX) || (!match && n.Op == influxql.NEQREGEX) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the || (!match && n.Op == influxql.NEQREGEX) can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will update the code, and if the tests pass, I will merge.

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.

None yet

3 participants