{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/4917","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/4917/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/4917/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/4917/events","html_url":"https://github.com/influxdata/influxdb/issues/4917","id":119027327,"number":4917,"title":"[0.9.5] multiple `OR tag` clauses return the results from only one clause","user":{"login":"Advoskr","id":12170766,"avatar_url":"https://avatars.githubusercontent.com/u/12170766?v=3","gravatar_id":"","url":"https://api.github.com/users/Advoskr","html_url":"https://github.com/Advoskr","followers_url":"https://api.github.com/users/Advoskr/followers","following_url":"https://api.github.com/users/Advoskr/following{/other_user}","gists_url":"https://api.github.com/users/Advoskr/gists{/gist_id}","starred_url":"https://api.github.com/users/Advoskr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Advoskr/subscriptions","organizations_url":"https://api.github.com/users/Advoskr/orgs","repos_url":"https://api.github.com/users/Advoskr/repos","events_url":"https://api.github.com/users/Advoskr/events{/privacy}","received_events_url":"https://api.github.com/users/Advoskr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/queries","name":"category/queries","color":"5319e7"},{"url":"https://api.github.com/repos/influxdata/influxdb/labels/support","name":"support","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-26T11:31:04Z","updated_at":"2016-01-24T16:28:03Z","closed_at":null,"body":"Hi! \r\n\r\nI've been tested some Influx quieries and found that OR operator works incorrectly when applied many times to one field.\r\n\r\nFirst of all, i have a series with some points\r\n![image](https://cloud.githubusercontent.com/assets/12170766/11421943/fd61a46a-9448-11e5-824f-a9ade21d1b64.png)\r\n\r\nAnd perform Select for it with AND operator to select specific time range:\r\nSelect * from MeasurementEvent where SensorAlias='S1' and (time>3 and time<6)\r\n![image](https://cloud.githubusercontent.com/assets/12170766/11421973/49af3fe4-9449-11e5-9bab-2d8755bcd098.png)\r\n\r\nWorks well! But when i want to find points, which are out if this range i get very strange result:\r\nSelect * from MeasurementEvent where SensorAlias='S1' and (time<3 OR time>6)\r\n![image](https://cloud.githubusercontent.com/assets/12170766/11422021/a9c9c534-9449-11e5-9acf-872d29bc954f.png)\r\n\r\nAlso, this bug(is it?) affects quieries like this:\r\nSelect * from MeasurementEvent where SensorAlias='S1' and (time=3 or time=4)\r\n![image](https://cloud.githubusercontent.com/assets/12170766/11422092/3d938cbe-944a-11e5-9dd0-f7beffff958e.png)\r\n\r\nAnd the last one is really critical to me, since Influx now doesn't support nor join, neither merge."},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/174313502","html_url":"https://github.com/influxdata/influxdb/issues/4917#issuecomment-174313502","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/4917","id":174313502,"user":{"login":"maksimru","id":7222812,"avatar_url":"https://avatars.githubusercontent.com/u/7222812?v=3","gravatar_id":"","url":"https://api.github.com/users/maksimru","html_url":"https://github.com/maksimru","followers_url":"https://api.github.com/users/maksimru/followers","following_url":"https://api.github.com/users/maksimru/following{/other_user}","gists_url":"https://api.github.com/users/maksimru/gists{/gist_id}","starred_url":"https://api.github.com/users/maksimru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksimru/subscriptions","organizations_url":"https://api.github.com/users/maksimru/orgs","repos_url":"https://api.github.com/users/maksimru/repos","events_url":"https://api.github.com/users/maksimru/events{/privacy}","received_events_url":"https://api.github.com/users/maksimru/received_events","type":"User","site_admin":false},"created_at":"2016-01-24T16:28:02Z","updated_at":"2016-01-24T16:28:02Z","body":"\"OR\" within time query doesnt work:\r\n\r\nSELECT MEAN(price) as avg_price FROM symbol_history where symbol_id = '142' and ((time > 1451053800s and time < 1451077200s)) group by time(1d)\r\n\r\nReturns:\r\n\r\n{\"results\":[{\"series\":[{\"name\":\"symbol_history\",\"columns\":[\"time\",\"avg_price\"],\"values\":[[\"2015-12-25T14\r\n:30:00.000000001Z\",202.22999999998783]]}]}]}\r\n\r\n\r\nSELECT MEAN(price) as avg_price FROM symbol_history where symbol_id = '142' and ((time > 1451053800s and time < 1451077200s) or (time > 1451313000s and time < 1451336400s)) group by time(1d)\r\n\r\nReturns:\r\n\r\n{\"results\":[{}]}\r\n\r\nExpected more results than in the first query"}}