{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22696","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22696/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22696/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22696/events","html_url":"https://github.com/apache/spark/pull/22696","id":369087459,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMTExMTg3","number":22696,"title":"[SPARK-25708][SQL] HAVING without GROUP BY means global aggregate","user":{"login":"cloud-fan","id":3182036,"node_id":"MDQ6VXNlcjMxODIwMzY=","avatar_url":"https://avatars3.githubusercontent.com/u/3182036?v=4","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-11T12:01:02Z","updated_at":"2018-10-11T14:02:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22696","html_url":"https://github.com/apache/spark/pull/22696","diff_url":"https://github.com/apache/spark/pull/22696.diff","patch_url":"https://github.com/apache/spark/pull/22696.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nAccording to the SQL standard, when a query contains `HAVING`, it indicates an aggregate operator. For more details please refer to https://blog.jooq.org/2014/12/04/do-you-really-understand-sqls-group-by-and-having-clauses/\r\n\r\nHowever, in Spark SQL parser, we treat HAVING as a normal filter when there is no GROUP BY, which breaks SQL semantic and lead to wrong result. This PR fixes the parser.\r\n\r\n## How was this patch tested?\r\n\r\nnew test"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/428967185","html_url":"https://github.com/apache/spark/pull/22696#issuecomment-428967185","issue_url":"https://api.github.com/repos/apache/spark/issues/22696","id":428967185,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODk2NzE4NQ==","user":{"login":"AmplabJenkins","id":4031291,"node_id":"MDQ6VXNlcjQwMzEyOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T14:02:14Z","updated_at":"2018-10-11T14:02:14Z","author_association":"NONE","body":"Merged build finished. Test FAILed."}}
{"actor":{"display_login":"AmplabJenkins"}}