{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9755","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9755/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9755/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9755/events","html_url":"https://github.com/cockroachdb/cockroach/issues/9755","id":181218037,"number":9755,"title":"sql: query returns incorrect results after adding an index","user":{"login":"eisenstatdavid","id":3858570,"avatar_url":"https://avatars.githubusercontent.com/u/3858570?v=3","gravatar_id":"","url":"https://api.github.com/users/eisenstatdavid","html_url":"https://github.com/eisenstatdavid","followers_url":"https://api.github.com/users/eisenstatdavid/followers","following_url":"https://api.github.com/users/eisenstatdavid/following{/other_user}","gists_url":"https://api.github.com/users/eisenstatdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/eisenstatdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eisenstatdavid/subscriptions","organizations_url":"https://api.github.com/users/eisenstatdavid/orgs","repos_url":"https://api.github.com/users/eisenstatdavid/repos","events_url":"https://api.github.com/users/eisenstatdavid/events{/privacy}","received_events_url":"https://api.github.com/users/eisenstatdavid/received_events","type":"User","site_admin":false},"labels":[{"id":78928345,"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/bug","name":"bug","color":"fc2929","default":true},{"id":469980185,"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/ux-surprise","name":"ux-surprise","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"mjibson","id":41181,"avatar_url":"https://avatars.githubusercontent.com/u/41181?v=3","gravatar_id":"","url":"https://api.github.com/users/mjibson","html_url":"https://github.com/mjibson","followers_url":"https://api.github.com/users/mjibson/followers","following_url":"https://api.github.com/users/mjibson/following{/other_user}","gists_url":"https://api.github.com/users/mjibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjibson/subscriptions","organizations_url":"https://api.github.com/users/mjibson/orgs","repos_url":"https://api.github.com/users/mjibson/repos","events_url":"https://api.github.com/users/mjibson/events{/privacy}","received_events_url":"https://api.github.com/users/mjibson/received_events","type":"User","site_admin":false},"assignees":[{"login":"mjibson","id":41181,"avatar_url":"https://avatars.githubusercontent.com/u/41181?v=3","gravatar_id":"","url":"https://api.github.com/users/mjibson","html_url":"https://github.com/mjibson","followers_url":"https://api.github.com/users/mjibson/followers","following_url":"https://api.github.com/users/mjibson/following{/other_user}","gists_url":"https://api.github.com/users/mjibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjibson/subscriptions","organizations_url":"https://api.github.com/users/mjibson/orgs","repos_url":"https://api.github.com/users/mjibson/repos","events_url":"https://api.github.com/users/mjibson/events{/privacy}","received_events_url":"https://api.github.com/users/mjibson/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/2","html_url":"https://github.com/cockroachdb/cockroach/milestone/2","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/2/labels","id":1240360,"number":2,"title":"1.0","description":"","creator":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"open_issues":233,"closed_issues":145,"state":"open","created_at":"2015-08-04T14:55:46Z","updated_at":"2017-02-22T22:43:25Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-10-05T17:33:11Z","updated_at":"2017-02-22T23:11:01Z","closed_at":null,"body":"There's an integer overflow somewhere. Run\n\n```\ncockroach sql <<EOF\nDROP DATABASE Foo;\nCREATE DATABASE Foo;\nCREATE TABLE Foo.Bar (a INT PRIMARY KEY, b FLOAT NOT NULL);\nINSERT INTO Foo.Bar VALUES\n (0,  0.0/0.0),\n (1, -1.0/0.0),\n (2, -1.0),\n (3,  0.0),\n (4,  1.0),\n (5,  1.0/0.0);\nEXPLAIN SELECT b FROM Foo.Bar WHERE (b, a) <= (1.0, 9223372036854775807);\nSELECT b FROM Foo.Bar WHERE (b, a) <= (1.0, 9223372036854775807);\nCREATE INDEX Baz ON Foo.Bar (b, a);\nEXPLAIN SELECT b FROM Foo.Bar WHERE (b, a) <= (1.0, 9223372036854775807);\nSELECT b FROM Foo.Bar WHERE (b, a) <= (1.0, 9223372036854775807);\n\nEXPLAIN SELECT b FROM Foo.Bar WHERE a <= 9223372036854775807;\nSELECT b FROM Foo.Bar WHERE a <= 9223372036854775807;\nEOF\n```\n\nand get\n\n```\nDROP DATABASE\nCREATE DATABASE\nCREATE TABLE\nINSERT 6\n1 row\nLevel   Type    Description\n0   scan    Bar@primary -\n5 rows\nb\nNaN\n-Inf\n-1\n0\n1\nCREATE INDEX\n1 row\nLevel   Type    Description\n0   scan    Bar@Baz /#-/1/-9223372036854775808\n4 rows\nb\nNaN\n-Inf\n-1\n0\n1 row\nLevel   Type    Description\n0   scan    Bar@primary /#-/<varint 9223372036854775808 overflows int64>\n6 rows\nb\nNaN\n-Inf\n-1\n0\n1\n+Inf\n```\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/281835924","html_url":"https://github.com/cockroachdb/cockroach/issues/9755#issuecomment-281835924","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9755","id":281835924,"user":{"login":"eisenstatdavid","id":3858570,"avatar_url":"https://avatars.githubusercontent.com/u/3858570?v=3","gravatar_id":"","url":"https://api.github.com/users/eisenstatdavid","html_url":"https://github.com/eisenstatdavid","followers_url":"https://api.github.com/users/eisenstatdavid/followers","following_url":"https://api.github.com/users/eisenstatdavid/following{/other_user}","gists_url":"https://api.github.com/users/eisenstatdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/eisenstatdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eisenstatdavid/subscriptions","organizations_url":"https://api.github.com/users/eisenstatdavid/orgs","repos_url":"https://api.github.com/users/eisenstatdavid/repos","events_url":"https://api.github.com/users/eisenstatdavid/events{/privacy}","received_events_url":"https://api.github.com/users/eisenstatdavid/received_events","type":"User","site_admin":false},"created_at":"2017-02-22T23:11:01Z","updated_at":"2017-02-22T23:11:01Z","body":"I didn't."}}
{"actor":{"display_login":"eisenstatdavid"}}