{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11931","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11931/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11931/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11931/events","html_url":"https://github.com/apache/spark/pull/11931","id":143173081,"number":11931,"title":"[SPARK-13456][SQL][follow-up] lazily generate the outer pointer for case class defined in REPL","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":12,"created_at":"2016-03-24T07:34:45Z","updated_at":"2016-03-24T16:05:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11931","html_url":"https://github.com/apache/spark/pull/11931","diff_url":"https://github.com/apache/spark/pull/11931.diff","patch_url":"https://github.com/apache/spark/pull/11931.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nIn https://github.com/apache/spark/pull/11410, we missed a corner case: define the inner class and use it in `Dataset` at the same time by using paste mode. For this case, the inner class and the `Dataset` are inside same line object, when we build the `Dataset`, we try to get outer pointer from line object, and it will fail because the line object is not initialized yet.\r\n\r\nhttps://issues.apache.org/jira/browse/SPARK-13456?focusedCommentId=15209174&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15209174 is an example for this corner case.\r\n\r\nThis PR make the process of getting outer pointer from line object lazy, so that we can successfully build the `Dataset` and finish initializing the line object.\r\n\r\n## How was this patch tested?\r\n\r\nnew test in repl suite."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/200903619","html_url":"https://github.com/apache/spark/pull/11931#issuecomment-200903619","issue_url":"https://api.github.com/repos/apache/spark/issues/11931","id":200903619,"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-03-24T16:05:50Z","updated_at":"2016-03-24T16:05:50Z","body":"**[Test build #54043 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54043/consoleFull)** for PR 11931 at commit [`f7e1f25`](https://github.com/apache/spark/commit/f7e1f25a3f5a2de6aa9dd4cd6edcabcb60b55763).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}