{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/146469083","pull_request_review_id":71413420,"id":146469083,"diff_hunk":"@@ -270,12 +270,25 @@ trait CheckAnalysis extends PredicateHelper {\n \n         operator match {\n           case o if o.children.nonEmpty && o.missingInput.nonEmpty =>\n+            val resolver = plan.conf.resolver\n+            val attrsWithSameName = o.missingInput.filter { missing =>\n+              o.inputSet.exists(input => resolver(missing.name, input.name))\n+            }\n+            val repeatedNameHint = if (attrsWithSameName.nonEmpty) {\n+              val commonNames = attrsWithSameName.map(_.name).mkString(\",\")\n+              s\"\"\"|Please check attribute(s) `$commonNames`, they seem to appear in two\n+                  |different input operators, with the same name.\"\"\".stripMargin","path":"sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala","position":null,"original_position":11,"commit_id":"34753b513323f5076edd4c5006983a9c9d3d97d7","original_commit_id":"e3cc4555b7a14299b93e8e4e0ae6d7f482582f9d","user":{"login":"rberenguel","id":2410938,"avatar_url":"https://avatars3.githubusercontent.com/u/2410938?v=4","gravatar_id":"","url":"https://api.github.com/users/rberenguel","html_url":"https://github.com/rberenguel","followers_url":"https://api.github.com/users/rberenguel/followers","following_url":"https://api.github.com/users/rberenguel/following{/other_user}","gists_url":"https://api.github.com/users/rberenguel/gists{/gist_id}","starred_url":"https://api.github.com/users/rberenguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rberenguel/subscriptions","organizations_url":"https://api.github.com/users/rberenguel/orgs","repos_url":"https://api.github.com/users/rberenguel/repos","events_url":"https://api.github.com/users/rberenguel/events{/privacy}","received_events_url":"https://api.github.com/users/rberenguel/received_events","type":"User","site_admin":false},"body":"I have changed it, now looks better no matter how many appear","created_at":"2017-10-24T07:07:40Z","updated_at":"2017-10-24T07:07:40Z","html_url":"https://github.com/apache/spark/pull/17100#discussion_r146469083","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/17100","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/146469083"},"html":{"href":"https://github.com/apache/spark/pull/17100#discussion_r146469083"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/17100"}},"in_reply_to_id":146255861},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/17100","id":108332682,"html_url":"https://github.com/apache/spark/pull/17100","diff_url":"https://github.com/apache/spark/pull/17100.diff","patch_url":"https://github.com/apache/spark/pull/17100.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/17100","number":17100,"state":"open","locked":false,"title":"[SPARK-13947][SQL] The error message from using an invalid column reference is not clear","user":{"login":"rberenguel","id":2410938,"avatar_url":"https://avatars3.githubusercontent.com/u/2410938?v=4","gravatar_id":"","url":"https://api.github.com/users/rberenguel","html_url":"https://github.com/rberenguel","followers_url":"https://api.github.com/users/rberenguel/followers","following_url":"https://api.github.com/users/rberenguel/following{/other_user}","gists_url":"https://api.github.com/users/rberenguel/gists{/gist_id}","starred_url":"https://api.github.com/users/rberenguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rberenguel/subscriptions","organizations_url":"https://api.github.com/users/rberenguel/orgs","repos_url":"https://api.github.com/users/rberenguel/repos","events_url":"https://api.github.com/users/rberenguel/events{/privacy}","received_events_url":"https://api.github.com/users/rberenguel/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\n Rewritten error message for clarity. Added extra information in case of attribute name collision, hinting the user to double-check referencing two different tables\r\n\r\n## How was this patch tested?\r\n\r\nNo functional changes, only final message has changed. It has been tested manually against the situation proposed in the JIRA ticket. Automated tests in repository pass.\r\n\r\nThis PR is original work from me and I license this work to the Spark project","created_at":"2017-02-28T13:46:07Z","updated_at":"2017-10-24T07:07:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba1b66076de1807680a18df7e961564453c488f5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/17100/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/17100/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/17100/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/34753b513323f5076edd4c5006983a9c9d3d97d7","head":{"label":"rberenguel:SPARK-13947-error-message","ref":"SPARK-13947-error-message","sha":"34753b513323f5076edd4c5006983a9c9d3d97d7","user":{"login":"rberenguel","id":2410938,"avatar_url":"https://avatars3.githubusercontent.com/u/2410938?v=4","gravatar_id":"","url":"https://api.github.com/users/rberenguel","html_url":"https://github.com/rberenguel","followers_url":"https://api.github.com/users/rberenguel/followers","following_url":"https://api.github.com/users/rberenguel/following{/other_user}","gists_url":"https://api.github.com/users/rberenguel/gists{/gist_id}","starred_url":"https://api.github.com/users/rberenguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rberenguel/subscriptions","organizations_url":"https://api.github.com/users/rberenguel/orgs","repos_url":"https://api.github.com/users/rberenguel/repos","events_url":"https://api.github.com/users/rberenguel/events{/privacy}","received_events_url":"https://api.github.com/users/rberenguel/received_events","type":"User","site_admin":false},"repo":{"id":83432411,"name":"spark","full_name":"rberenguel/spark","owner":{"login":"rberenguel","id":2410938,"avatar_url":"https://avatars3.githubusercontent.com/u/2410938?v=4","gravatar_id":"","url":"https://api.github.com/users/rberenguel","html_url":"https://github.com/rberenguel","followers_url":"https://api.github.com/users/rberenguel/followers","following_url":"https://api.github.com/users/rberenguel/following{/other_user}","gists_url":"https://api.github.com/users/rberenguel/gists{/gist_id}","starred_url":"https://api.github.com/users/rberenguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rberenguel/subscriptions","organizations_url":"https://api.github.com/users/rberenguel/orgs","repos_url":"https://api.github.com/users/rberenguel/repos","events_url":"https://api.github.com/users/rberenguel/events{/privacy}","received_events_url":"https://api.github.com/users/rberenguel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rberenguel/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/rberenguel/spark","forks_url":"https://api.github.com/repos/rberenguel/spark/forks","keys_url":"https://api.github.com/repos/rberenguel/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rberenguel/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rberenguel/spark/teams","hooks_url":"https://api.github.com/repos/rberenguel/spark/hooks","issue_events_url":"https://api.github.com/repos/rberenguel/spark/issues/events{/number}","events_url":"https://api.github.com/repos/rberenguel/spark/events","assignees_url":"https://api.github.com/repos/rberenguel/spark/assignees{/user}","branches_url":"https://api.github.com/repos/rberenguel/spark/branches{/branch}","tags_url":"https://api.github.com/repos/rberenguel/spark/tags","blobs_url":"https://api.github.com/repos/rberenguel/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rberenguel/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rberenguel/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/rberenguel/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rberenguel/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/rberenguel/spark/languages","stargazers_url":"https://api.github.com/repos/rberenguel/spark/stargazers","contributors_url":"https://api.github.com/repos/rberenguel/spark/contributors","subscribers_url":"https://api.github.com/repos/rberenguel/spark/subscribers","subscription_url":"https://api.github.com/repos/rberenguel/spark/subscription","commits_url":"https://api.github.com/repos/rberenguel/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/rberenguel/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/rberenguel/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/rberenguel/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/rberenguel/spark/contents/{+path}","compare_url":"https://api.github.com/repos/rberenguel/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rberenguel/spark/merges","archive_url":"https://api.github.com/repos/rberenguel/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rberenguel/spark/downloads","issues_url":"https://api.github.com/repos/rberenguel/spark/issues{/number}","pulls_url":"https://api.github.com/repos/rberenguel/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/rberenguel/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/rberenguel/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rberenguel/spark/labels{/name}","releases_url":"https://api.github.com/repos/rberenguel/spark/releases{/id}","deployments_url":"https://api.github.com/repos/rberenguel/spark/deployments","created_at":"2017-02-28T12:55:42Z","updated_at":"2017-02-28T12:56:04Z","pushed_at":"2017-10-23T21:08:03Z","git_url":"git://github.com/rberenguel/spark.git","ssh_url":"git@github.com:rberenguel/spark.git","clone_url":"https://github.com/rberenguel/spark.git","svn_url":"https://github.com/rberenguel/spark","homepage":null,"size":262398,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"ff8de99a1c7b4a291e661cd0ad12748f4321e43d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2017-10-24T04:46:16Z","pushed_at":"2017-10-24T05:41:12Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":264769,"stargazers_count":14758,"watchers_count":14758,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13794,"mirror_url":"git://git.apache.org/spark.git","archived":false,"open_issues_count":394,"forks":13794,"open_issues":394,"watchers":14758,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/17100"},"html":{"href":"https://github.com/apache/spark/pull/17100"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/17100"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/17100/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/17100/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/17100/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/34753b513323f5076edd4c5006983a9c9d3d97d7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rberenguel"}}