{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/10819","labels_url":"https://api.github.com/repos/apache/spark/issues/10819/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/10819/comments","events_url":"https://api.github.com/repos/apache/spark/issues/10819/events","html_url":"https://github.com/apache/spark/pull/10819","id":127327038,"number":10819,"title":"[SPARK-12841][SQL][branch-1.6] fix cast in filter","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","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,"milestone":null,"comments":11,"created_at":"2016-01-18T22:56:37Z","updated_at":"2016-01-19T02:54:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/10819","html_url":"https://github.com/apache/spark/pull/10819","diff_url":"https://github.com/apache/spark/pull/10819.diff","patch_url":"https://github.com/apache/spark/pull/10819.patch"},"body":"In SPARK-10743 we wrap cast with `UnresolvedAlias` to give `Cast` a better alias if possible. However, for cases like filter, the `UnresolvedAlias` can't be resolved and actually we don't need a better alias for this case. This PR move the cast wrapping logic to `Column.named` so that we will only do it when we need a alias name.\r\n\r\nbackport https://github.com/apache/spark/pull/10781 to 1.6"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/172722743","html_url":"https://github.com/apache/spark/pull/10819#issuecomment-172722743","issue_url":"https://api.github.com/repos/apache/spark/issues/10819","id":172722743,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T02:54:44Z","updated_at":"2016-01-19T02:54:44Z","body":"**[Test build #49655 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49655/consoleFull)** for PR 10819 at commit [`4e3269b`](https://github.com/apache/spark/commit/4e3269bd5e0aa6b262500f92da502f441b1671b3)."}}