{"action":"created","issue":{"url":"https://api.github.com/repos/groonga/groonga/issues/426","labels_url":"https://api.github.com/repos/groonga/groonga/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/groonga/groonga/issues/426/comments","events_url":"https://api.github.com/repos/groonga/groonga/issues/426/events","html_url":"https://github.com/groonga/groonga/issues/426","id":115814518,"number":426,"title":"grn_ts: reject Inf and NaN in evaluation","user":{"login":"s-yata","id":778712,"avatar_url":"https://avatars.githubusercontent.com/u/778712?v=3","gravatar_id":"","url":"https://api.github.com/users/s-yata","html_url":"https://github.com/s-yata","followers_url":"https://api.github.com/users/s-yata/followers","following_url":"https://api.github.com/users/s-yata/following{/other_user}","gists_url":"https://api.github.com/users/s-yata/gists{/gist_id}","starred_url":"https://api.github.com/users/s-yata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-yata/subscriptions","organizations_url":"https://api.github.com/users/s-yata/orgs","repos_url":"https://api.github.com/users/s-yata/repos","events_url":"https://api.github.com/users/s-yata/events{/privacy}","received_events_url":"https://api.github.com/users/s-yata/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/groonga/groonga/labels/TS","name":"TS","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"s-yata","id":778712,"avatar_url":"https://avatars.githubusercontent.com/u/778712?v=3","gravatar_id":"","url":"https://api.github.com/users/s-yata","html_url":"https://github.com/s-yata","followers_url":"https://api.github.com/users/s-yata/followers","following_url":"https://api.github.com/users/s-yata/following{/other_user}","gists_url":"https://api.github.com/users/s-yata/gists{/gist_id}","starred_url":"https://api.github.com/users/s-yata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-yata/subscriptions","organizations_url":"https://api.github.com/users/s-yata/orgs","repos_url":"https://api.github.com/users/s-yata/repos","events_url":"https://api.github.com/users/s-yata/events{/privacy}","received_events_url":"https://api.github.com/users/s-yata/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-11-09T06:56:44Z","updated_at":"2015-11-10T04:08:01Z","closed_at":null,"body":"#### Description\r\n\r\nStop evaluation and return an error if an `Inf` or `NaN` appears.\r\n\r\nNote that Groonga does not allow division by zero even if the operands are Float."},"comment":{"url":"https://api.github.com/repos/groonga/groonga/issues/comments/155279325","html_url":"https://github.com/groonga/groonga/issues/426#issuecomment-155279325","issue_url":"https://api.github.com/repos/groonga/groonga/issues/426","id":155279325,"user":{"login":"s-yata","id":778712,"avatar_url":"https://avatars.githubusercontent.com/u/778712?v=3","gravatar_id":"","url":"https://api.github.com/users/s-yata","html_url":"https://github.com/s-yata","followers_url":"https://api.github.com/users/s-yata/followers","following_url":"https://api.github.com/users/s-yata/following{/other_user}","gists_url":"https://api.github.com/users/s-yata/gists{/gist_id}","starred_url":"https://api.github.com/users/s-yata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-yata/subscriptions","organizations_url":"https://api.github.com/users/s-yata/orgs","repos_url":"https://api.github.com/users/s-yata/repos","events_url":"https://api.github.com/users/s-yata/events{/privacy}","received_events_url":"https://api.github.com/users/s-yata/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T04:08:00Z","updated_at":"2015-11-10T04:08:00Z","body":"I've confirmed the new version can detect Inf and NaN.\r\n\r\n```\r\n$ src/groonga -n /tmp/groonga/db\r\n\r\n> table_create Table TABLE_NO_KEY\r\n[[0,1447128236.52815,0.00205683708190918],true]\r\n\r\n> load --table Table --values [[]]\r\n[[0,1447128238.72084,0.000167608261108398],1]\r\n\r\n> select Table --filter '?true' --output_columns '-9223372036854775808/-1'\r\n[[0,1447128243.64819,0.000516176223754883],[[[1],[[\"-9223372036854775808/-1\",\"Int64\"]],[-9223372036854775808]]]]\r\n\r\n> select Table --filter '?true' --output_columns '1/0'\r\n[[-22,1447128251.07438,0.000646591186523438,\"1 / 0 causes division by zero\",[[\"grn_ts_op_division_int_int\",\"ts_expr.c\",1069]]]]\r\n\r\n> select Table --filter '?true' --output_columns '1%0'\r\n[[-22,1447128254.5438,0.000499248504638672,\"1 % 0 causes division by zero\",[[\"grn_ts_op_modulus_int_int\",\"ts_expr.c\",1091]]]]\r\n\r\n> select Table --filter '?true' --output_columns '1.0/0.0'\r\n[[-22,1447128256.77113,0.00049138069152832,\"1 / 0 = inf\",[[\"grn_ts_op_division_float_float\",\"ts_expr.c\",1080]]]]\r\n\r\n> select Table --filter '?true' --output_columns '0.0/0.0'\r\n[[-22,1447128259.73154,0.000444889068603516,\"0 / 0 = -nan\",[[\"grn_ts_op_division_float_float\",\"ts_expr.c\",1080]]]]\r\n\r\n> select Table --filter '?true' --output_columns '1e300*1e300'\r\n[[-22,1447128262.22024,0.00059199333190918,\"1e+300 * 1e+300 = inf\",[[\"grn_ts_op_multiplication_float_float\",\"ts_expr.c\",1058]]]]\r\n```\r\n"}}