{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/198364542","pull_request_review_id":132282285,"id":198364542,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODM2NDU0Mg==","diff_hunk":"@@ -2017,6 +2017,7 @@ working with timestamps in `pandas_udf`s to get the best performance, see\n     - Literal values used in SQL operations are converted to DECIMAL with the exact precision and scale needed by them.\n     - The configuration `spark.sql.decimalOperations.allowPrecisionLoss` has been introduced. It defaults to `true`, which means the new behavior described here; if set to `false`, Spark uses previous rules, ie. it doesn't adjust the needed scale to represent the values and it returns NULL if an exact representation of the value is not possible.\n   - In PySpark, `df.replace` does not allow to omit `value` when `to_replace` is not a dictionary. Previously, `value` could be omitted in the other cases and had `None` by default, which is counterintuitive and error-prone.\n+  - Un-aliased subquery is supported by Spark SQL for a long time. Its semantic was not well defined and had confusing behaviors. Since Spark 2.3, we invalid a weird use case: `SELECT v.i from (SELECT i FROM v)`. Now this query will throw analysis exception because users should not be able to use the qualifier inside a subquery. See [SPARK-20690](https://issues.apache.org/jira/browse/SPARK-20690) and [SPARK-21335](https://issues.apache.org/jira/browse/SPARK-21335) for details.","path":"docs/sql-programming-guide.md","position":4,"original_position":4,"commit_id":"c611a113dce56600928cdbada69b6ec832903043","original_commit_id":"c611a113dce56600928cdbada69b6ec832903043","user":{"login":"HyukjinKwon","id":6477701,"node_id":"MDQ6VXNlcjY0Nzc3MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/6477701?v=4","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"body":"Also consider:\r\n\r\nNow this query will throw analysis exception because users should not be able to use the qualifier inside a subquery.\r\n\r\n->\r\n\r\nThe cases throw an analysis exception because users should not be able to use the qualifier inside a subquery.\r\n\r\n","created_at":"2018-06-27T04:34:39Z","updated_at":"2018-06-27T04:34:40Z","html_url":"https://github.com/apache/spark/pull/21647#discussion_r198364542","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/21647","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/198364542"},"html":{"href":"https://github.com/apache/spark/pull/21647#discussion_r198364542"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/21647"}},"in_reply_to_id":198364360},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/21647","id":197608431,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NjA4NDMx","html_url":"https://github.com/apache/spark/pull/21647","diff_url":"https://github.com/apache/spark/pull/21647.diff","patch_url":"https://github.com/apache/spark/pull/21647.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/21647","number":21647,"state":"open","locked":false,"title":"[SPARK-21335] [DOC] doc changes for disallowed un-aliased subquery use case","user":{"login":"cnZach","id":2384258,"node_id":"MDQ6VXNlcjIzODQyNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2384258?v=4","gravatar_id":"","url":"https://api.github.com/users/cnZach","html_url":"https://github.com/cnZach","followers_url":"https://api.github.com/users/cnZach/followers","following_url":"https://api.github.com/users/cnZach/following{/other_user}","gists_url":"https://api.github.com/users/cnZach/gists{/gist_id}","starred_url":"https://api.github.com/users/cnZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnZach/subscriptions","organizations_url":"https://api.github.com/users/cnZach/orgs","repos_url":"https://api.github.com/users/cnZach/repos","events_url":"https://api.github.com/users/cnZach/events{/privacy}","received_events_url":"https://api.github.com/users/cnZach/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\nDocument a change for un-aliased subquery use case, to address the last question in PR #18559:\r\nhttps://github.com/apache/spark/pull/18559#issuecomment-316884858\r\n\r\n(Please fill in changes proposed in this fix)\r\n\r\n## How was this patch tested?\r\n it does not affect tests.\r\n\r\nPlease review http://spark.apache.org/contributing.html before opening a pull request.\r\n","created_at":"2018-06-27T03:40:15Z","updated_at":"2018-06-27T04:34:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ba06716c39b176dd071d63b35185b35a34e9aaf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/21647/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/21647/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/21647/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/c611a113dce56600928cdbada69b6ec832903043","head":{"label":"cnZach:doc_change_for_SPARK-20690_SPARK-21335","ref":"doc_change_for_SPARK-20690_SPARK-21335","sha":"c611a113dce56600928cdbada69b6ec832903043","user":{"login":"cnZach","id":2384258,"node_id":"MDQ6VXNlcjIzODQyNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2384258?v=4","gravatar_id":"","url":"https://api.github.com/users/cnZach","html_url":"https://github.com/cnZach","followers_url":"https://api.github.com/users/cnZach/followers","following_url":"https://api.github.com/users/cnZach/following{/other_user}","gists_url":"https://api.github.com/users/cnZach/gists{/gist_id}","starred_url":"https://api.github.com/users/cnZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnZach/subscriptions","organizations_url":"https://api.github.com/users/cnZach/orgs","repos_url":"https://api.github.com/users/cnZach/repos","events_url":"https://api.github.com/users/cnZach/events{/privacy}","received_events_url":"https://api.github.com/users/cnZach/received_events","type":"User","site_admin":false},"repo":{"id":75844237,"node_id":"MDEwOlJlcG9zaXRvcnk3NTg0NDIzNw==","name":"spark","full_name":"cnZach/spark","owner":{"login":"cnZach","id":2384258,"node_id":"MDQ6VXNlcjIzODQyNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2384258?v=4","gravatar_id":"","url":"https://api.github.com/users/cnZach","html_url":"https://github.com/cnZach","followers_url":"https://api.github.com/users/cnZach/followers","following_url":"https://api.github.com/users/cnZach/following{/other_user}","gists_url":"https://api.github.com/users/cnZach/gists{/gist_id}","starred_url":"https://api.github.com/users/cnZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnZach/subscriptions","organizations_url":"https://api.github.com/users/cnZach/orgs","repos_url":"https://api.github.com/users/cnZach/repos","events_url":"https://api.github.com/users/cnZach/events{/privacy}","received_events_url":"https://api.github.com/users/cnZach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cnZach/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/cnZach/spark","forks_url":"https://api.github.com/repos/cnZach/spark/forks","keys_url":"https://api.github.com/repos/cnZach/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cnZach/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cnZach/spark/teams","hooks_url":"https://api.github.com/repos/cnZach/spark/hooks","issue_events_url":"https://api.github.com/repos/cnZach/spark/issues/events{/number}","events_url":"https://api.github.com/repos/cnZach/spark/events","assignees_url":"https://api.github.com/repos/cnZach/spark/assignees{/user}","branches_url":"https://api.github.com/repos/cnZach/spark/branches{/branch}","tags_url":"https://api.github.com/repos/cnZach/spark/tags","blobs_url":"https://api.github.com/repos/cnZach/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cnZach/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cnZach/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/cnZach/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cnZach/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/cnZach/spark/languages","stargazers_url":"https://api.github.com/repos/cnZach/spark/stargazers","contributors_url":"https://api.github.com/repos/cnZach/spark/contributors","subscribers_url":"https://api.github.com/repos/cnZach/spark/subscribers","subscription_url":"https://api.github.com/repos/cnZach/spark/subscription","commits_url":"https://api.github.com/repos/cnZach/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/cnZach/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/cnZach/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/cnZach/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/cnZach/spark/contents/{+path}","compare_url":"https://api.github.com/repos/cnZach/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cnZach/spark/merges","archive_url":"https://api.github.com/repos/cnZach/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cnZach/spark/downloads","issues_url":"https://api.github.com/repos/cnZach/spark/issues{/number}","pulls_url":"https://api.github.com/repos/cnZach/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/cnZach/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/cnZach/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cnZach/spark/labels{/name}","releases_url":"https://api.github.com/repos/cnZach/spark/releases{/id}","deployments_url":"https://api.github.com/repos/cnZach/spark/deployments","created_at":"2016-12-07T14:34:55Z","updated_at":"2018-06-27T02:07:35Z","pushed_at":"2018-06-27T03:33:32Z","git_url":"git://github.com/cnZach/spark.git","ssh_url":"git@github.com:cnZach/spark.git","clone_url":"https://github.com/cnZach/spark.git","svn_url":"https://github.com/cnZach/spark","homepage":null,"size":266903,"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,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"2669b4de3b336dde84b698c20dbc73b30abf79d4","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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,"node_id":"MDEwOlJlcG9zaXRvcnkxNzE2NTY1OA==","name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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":"2018-06-27T04:22:02Z","pushed_at":"2018-06-27T04:04:04Z","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":272415,"stargazers_count":17858,"watchers_count":17858,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16227,"mirror_url":null,"archived":false,"open_issues_count":567,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":16227,"open_issues":567,"watchers":17858,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/21647"},"html":{"href":"https://github.com/apache/spark/pull/21647"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/21647"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/21647/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/21647/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/21647/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/c611a113dce56600928cdbada69b6ec832903043"}},"author_association":"NONE"}}
{"actor":{"display_login":"HyukjinKwon"}}