{"action":"created","issue":{"url":"https://api.github.com/repos/youtube/vitess/issues/282","labels_url":"https://api.github.com/repos/youtube/vitess/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/youtube/vitess/issues/282/comments","events_url":"https://api.github.com/repos/youtube/vitess/issues/282/events","html_url":"https://github.com/youtube/vitess/pull/282","id":53311207,"number":282,"title":"Added support for IS [NOT] (TRUE|FALSE). Fixed IS [NOT] NULL ","user":{"login":"shlomi-noach","id":2607934,"avatar_url":"https://avatars.githubusercontent.com/u/2607934?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomi-noach","html_url":"https://github.com/shlomi-noach","followers_url":"https://api.github.com/users/shlomi-noach/followers","following_url":"https://api.github.com/users/shlomi-noach/following{/other_user}","gists_url":"https://api.github.com/users/shlomi-noach/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomi-noach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomi-noach/subscriptions","organizations_url":"https://api.github.com/users/shlomi-noach/orgs","repos_url":"https://api.github.com/users/shlomi-noach/repos","events_url":"https://api.github.com/users/shlomi-noach/events{/privacy}","received_events_url":"https://api.github.com/users/shlomi-noach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-03T18:22:32Z","updated_at":"2015-01-10T06:35:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/youtube/vitess/pulls/282","html_url":"https://github.com/youtube/vitess/pull/282","diff_url":"https://github.com/youtube/vitess/pull/282.diff","patch_url":"https://github.com/youtube/vitess/pull/282.patch"},"body":"The sqlparser failed on the following valid statements:\r\n- select 1 from t where a is true\r\n- select 1 from t where a is not true\r\n- select 1 from t where (a + b) is true\r\n- select 1 from t where a is false\r\n- select 1 from t where a is not false\r\n- select 1 from t where (a < b) is true\r\n\r\nAlso, IS [NOT] NULL was incomplete. The parser failed on:\r\n- select 1 from t where (a + b) is null\r\n- select 1 from t where (a + b) is not null\r\n\r\n(IS NULL was not aupported for a boolean_expression but only for a condition)\r\n\r\nTreatment of IS TRUE, IS FALSE and IS NULL is identical.\r\nDo note that IS NULL (and likewise IS TRUE, IS FALSE) is recognized in two distinct formats:\r\n- NullCheck (existing format)\r\n- NullExpr (new format)\r\nThe latter has a BoolExpr instead of a ValExpr and this unfortunate split seems to be required (or else there can be further magic I'm unaware of).\r\n\r\nI've added tests in parse_pass to demonstrate and validate the new supported syntax."},"comment":{"url":"https://api.github.com/repos/youtube/vitess/issues/comments/69445607","html_url":"https://github.com/youtube/vitess/pull/282#issuecomment-69445607","issue_url":"https://api.github.com/repos/youtube/vitess/issues/282","id":69445607,"user":{"login":"shlomi-noach","id":2607934,"avatar_url":"https://avatars.githubusercontent.com/u/2607934?v=3","gravatar_id":"","url":"https://api.github.com/users/shlomi-noach","html_url":"https://github.com/shlomi-noach","followers_url":"https://api.github.com/users/shlomi-noach/followers","following_url":"https://api.github.com/users/shlomi-noach/following{/other_user}","gists_url":"https://api.github.com/users/shlomi-noach/gists{/gist_id}","starred_url":"https://api.github.com/users/shlomi-noach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shlomi-noach/subscriptions","organizations_url":"https://api.github.com/users/shlomi-noach/orgs","repos_url":"https://api.github.com/users/shlomi-noach/repos","events_url":"https://api.github.com/users/shlomi-noach/events{/privacy}","received_events_url":"https://api.github.com/users/shlomi-noach/received_events","type":"User","site_admin":false},"created_at":"2015-01-10T06:35:14Z","updated_at":"2015-01-10T06:35:14Z","body":"Haha, sorry. I thought you were taking a look into and was awaiting your\r\nthoughts.\r\n\r\nYes, I want the feature if possible, much appreciated.\r\n\r\nOn Friday, January 9, 2015, sougou <notifications@github.com> wrote:\r\n\r\n> The silence is deafening :). If you still want the feature and don't want\r\n> to break vitess, I can spin up a CL that does the first half for now:\r\n> (BoolExpr (is| is not) (true|false|null).\r\n> As mentioned, ValExpr will take more work.\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/youtube/vitess/pull/282#issuecomment-69385154>.\r\n>"}}