{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/9271","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/9271/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/9271/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/9271/events","html_url":"https://github.com/influxdata/influxdb/issues/9271","id":285462627,"number":9271,"title":"1.4.0 regression: fill() in a subquery causes long delay and incorrect result","user":{"login":"sandeen","id":427124,"avatar_url":"https://avatars1.githubusercontent.com/u/427124?v=4","gravatar_id":"","url":"https://api.github.com/users/sandeen","html_url":"https://github.com/sandeen","followers_url":"https://api.github.com/users/sandeen/followers","following_url":"https://api.github.com/users/sandeen/following{/other_user}","gists_url":"https://api.github.com/users/sandeen/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeen/subscriptions","organizations_url":"https://api.github.com/users/sandeen/orgs","repos_url":"https://api.github.com/users/sandeen/repos","events_url":"https://api.github.com/users/sandeen/events{/privacy}","received_events_url":"https://api.github.com/users/sandeen/received_events","type":"User","site_admin":false},"labels":[{"id":423447468,"url":"https://api.github.com/repos/influxdata/influxdb/labels/kind/bug","name":"kind/bug","color":"d93f0b","default":false},{"id":763571862,"url":"https://api.github.com/repos/influxdata/influxdb/labels/needs-backport/1.4","name":"needs-backport/1.4","color":"004066","default":false}],"state":"closed","locked":false,"assignee":{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars2.githubusercontent.com/u/1212129?v=4","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false},"assignees":[{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars2.githubusercontent.com/u/1212129?v=4","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/influxdata/influxdb/milestones/73","html_url":"https://github.com/influxdata/influxdb/milestone/73","labels_url":"https://api.github.com/repos/influxdata/influxdb/milestones/73/labels","id":2898026,"number":73,"title":"1.5.0","description":null,"creator":{"login":"jwilder","id":219935,"avatar_url":"https://avatars3.githubusercontent.com/u/219935?v=4","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":34,"state":"open","created_at":"2017-11-08T18:56:20Z","updated_at":"2018-03-13T15:47:23Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2018-01-02T15:46:38Z","updated_at":"2018-03-30T13:25:17Z","closed_at":"2018-02-28T14:06:16Z","author_association":"NONE","body":"### Bug report\r\n\r\n__System info:__ influxdb-1.4.2-1.x86_64 on CentOS7\r\n\r\n__Steps to reproduce:__\r\n\r\nOn my database:\r\n\r\n`SELECT sum(\"BTU_Hr\") FROM (SELECT mean(\"value\") as \"BTU_Hr\" FROM \"modbus_value\" WHERE (\"type_instance\" = 'firing-rate') AND time >= now() - 1h GROUP BY time(5m) fill(36))\r\n`\r\n\r\nFrom scratch:\r\n\r\n```\r\n> create database testdb\r\n> use database testdb\r\n> insert test value=2\r\n> SELECT mean(\"value\") FROM \"test\" WHERE time >= now() - 10m GROUP BY time(5m) fill(36)\r\nname: test\r\ntime                mean\r\n----                ----\r\n1516650300000000000 36\r\n1516650600000000000 36\r\n1516650900000000000 2\r\n>\r\n```\r\n\r\n(note first timestamp, use that in next query to work around other parsing bug(?))\r\n\r\n```\r\n> SELECT SUM(mean) FROM (SELECT mean(\"value\") FROM \"test\" WHERE time >= 1516650300000000000 GROUP BY time(5m) fill(36))\r\nname: test\r\ntime sum\r\n---- ---\r\n0    3138415850\r\n>\r\n```\r\nNote the incorrect value and the very long wait.\r\n\r\n__Expected behavior:__ A value is quickly returned\r\n__Actual behavior:__ Influxdb returns after long delay with incorrect value\r\n\r\n__Additional info:__ \r\n\r\nThis works if I use fill(null) instead:\r\n\r\n```\r\n> SELECT SUM(mean) FROM (SELECT mean(\"value\") FROM \"test\" WHERE time >= 1516650300000000000 GROUP BY time(5m) fill(null))\r\nname: test\r\ntime sum\r\n---- ---\r\n0    2\r\n```\r\nThis seems to be a regression between 1.3.8 and 1.4.0\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/377523528","html_url":"https://github.com/influxdata/influxdb/issues/9271#issuecomment-377523528","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/9271","id":377523528,"user":{"login":"sandeen","id":427124,"avatar_url":"https://avatars1.githubusercontent.com/u/427124?v=4","gravatar_id":"","url":"https://api.github.com/users/sandeen","html_url":"https://github.com/sandeen","followers_url":"https://api.github.com/users/sandeen/followers","following_url":"https://api.github.com/users/sandeen/following{/other_user}","gists_url":"https://api.github.com/users/sandeen/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeen/subscriptions","organizations_url":"https://api.github.com/users/sandeen/orgs","repos_url":"https://api.github.com/users/sandeen/repos","events_url":"https://api.github.com/users/sandeen/events{/privacy}","received_events_url":"https://api.github.com/users/sandeen/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T13:25:17Z","updated_at":"2018-03-30T13:25:17Z","author_association":"NONE","body":"Thanks for sorting this out, btw."}}
{"actor":{"display_login":"sandeen"}}