{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/10722","labels_url":"https://api.github.com/repos/apache/spark/issues/10722/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/10722/comments","events_url":"https://api.github.com/repos/apache/spark/issues/10722/events","html_url":"https://github.com/apache/spark/pull/10722","id":126122583,"number":10722,"title":"[SPARK-12768][SQL] Remove CaseKeyWhen expression","user":{"login":"rxin","id":323388,"avatar_url":"https://avatars.githubusercontent.com/u/323388?v=3","gravatar_id":"","url":"https://api.github.com/users/rxin","html_url":"https://github.com/rxin","followers_url":"https://api.github.com/users/rxin/followers","following_url":"https://api.github.com/users/rxin/following{/other_user}","gists_url":"https://api.github.com/users/rxin/gists{/gist_id}","starred_url":"https://api.github.com/users/rxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxin/subscriptions","organizations_url":"https://api.github.com/users/rxin/orgs","repos_url":"https://api.github.com/users/rxin/repos","events_url":"https://api.github.com/users/rxin/events{/privacy}","received_events_url":"https://api.github.com/users/rxin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T08:10:59Z","updated_at":"2016-01-12T08:11:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/10722","html_url":"https://github.com/apache/spark/pull/10722","diff_url":"https://github.com/apache/spark/pull/10722.diff","patch_url":"https://github.com/apache/spark/pull/10722.patch"},"body":"This patch removes CaseKeyWhen expression and replaces it with a factory method that generates the equivalent CaseWhen. This reduces the amount of code we'd need to maintain in the future for both code generation and optimizer.\r\n\r\nNote that we introduced CaseKeyWhen to avoid duplicate evaluations of the key. This is no longer a problem because we now have common subexpression elimination.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/170833510","html_url":"https://github.com/apache/spark/pull/10722#issuecomment-170833510","issue_url":"https://api.github.com/repos/apache/spark/issues/10722","id":170833510,"user":{"login":"rxin","id":323388,"avatar_url":"https://avatars.githubusercontent.com/u/323388?v=3","gravatar_id":"","url":"https://api.github.com/users/rxin","html_url":"https://github.com/rxin","followers_url":"https://api.github.com/users/rxin/followers","following_url":"https://api.github.com/users/rxin/following{/other_user}","gists_url":"https://api.github.com/users/rxin/gists{/gist_id}","starred_url":"https://api.github.com/users/rxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxin/subscriptions","organizations_url":"https://api.github.com/users/rxin/orgs","repos_url":"https://api.github.com/users/rxin/repos","events_url":"https://api.github.com/users/rxin/events{/privacy}","received_events_url":"https://api.github.com/users/rxin/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T08:11:30Z","updated_at":"2016-01-12T08:11:30Z","body":"This is based on https://github.com/apache/spark/pull/10716\r\n\r\nI will rebase once that is merged. To see the actual diff, see https://github.com/rxin/spark/commit/6be7b956835010248d48f551d469a176f5a946e1"}}