{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/85477511","pull_request_review_id":6191855,"id":85477511,"diff_hunk":"@@ -373,6 +373,11 @@ object SQLConf {\n     .booleanConf\n     .createWithDefault(true)\n \n+  val STARJOIN_OPTIMIZATION = SQLConfigBuilder(\"spark.sql.starJoinOptimization\")\n+    .doc(\"When true, it enables join reordering based on star schema detection. \")\n+    .booleanConf\n+    .createWithDefault(false)","path":"sql/core/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala","position":7,"original_position":7,"commit_id":"9bddb86f89689406c1a0efb2a64f900609379d31","original_commit_id":"9bddb86f89689406c1a0efb2a64f900609379d31","user":{"login":"ioana-delaney","id":17709782,"avatar_url":"https://avatars.githubusercontent.com/u/17709782?v=3","gravatar_id":"","url":"https://api.github.com/users/ioana-delaney","html_url":"https://github.com/ioana-delaney","followers_url":"https://api.github.com/users/ioana-delaney/followers","following_url":"https://api.github.com/users/ioana-delaney/following{/other_user}","gists_url":"https://api.github.com/users/ioana-delaney/gists{/gist_id}","starred_url":"https://api.github.com/users/ioana-delaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioana-delaney/subscriptions","organizations_url":"https://api.github.com/users/ioana-delaney/orgs","repos_url":"https://api.github.com/users/ioana-delaney/repos","events_url":"https://api.github.com/users/ioana-delaney/events{/privacy}","received_events_url":"https://api.github.com/users/ioana-delaney/received_events","type":"User","site_admin":false},"body":"Do you suggest to have another internal config that will be enabled for testing purposes?\r\n","created_at":"2016-10-28T06:21:27Z","updated_at":"2016-10-28T06:21:27Z","html_url":"https://github.com/apache/spark/pull/15363#discussion_r85477511","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/15363","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/85477511"},"html":{"href":"https://github.com/apache/spark/pull/15363#discussion_r85477511"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/15363"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15363","id":88170644,"html_url":"https://github.com/apache/spark/pull/15363","diff_url":"https://github.com/apache/spark/pull/15363.diff","patch_url":"https://github.com/apache/spark/pull/15363.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/15363","number":15363,"state":"open","locked":false,"title":"[SPARK-17791][SQL] Join reordering using star schema detection","user":{"login":"ioana-delaney","id":17709782,"avatar_url":"https://avatars.githubusercontent.com/u/17709782?v=3","gravatar_id":"","url":"https://api.github.com/users/ioana-delaney","html_url":"https://github.com/ioana-delaney","followers_url":"https://api.github.com/users/ioana-delaney/followers","following_url":"https://api.github.com/users/ioana-delaney/following{/other_user}","gists_url":"https://api.github.com/users/ioana-delaney/gists{/gist_id}","starred_url":"https://api.github.com/users/ioana-delaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioana-delaney/subscriptions","organizations_url":"https://api.github.com/users/ioana-delaney/orgs","repos_url":"https://api.github.com/users/ioana-delaney/repos","events_url":"https://api.github.com/users/ioana-delaney/events{/privacy}","received_events_url":"https://api.github.com/users/ioana-delaney/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nStar schema consists of one or more fact tables referencing a number of dimension tables. In general, queries against star schema are expected to run fast because of the established RI constraints among the tables. This design proposes a join reordering based on natural, generally accepted heuristics for star schema queries:\r\n- Finds the star join with the largest fact table and places it on the driving arm of the left-deep join. This plan avoids large tables on the inner, and thus favors hash joins. \r\n- Applies the most selective dimensions early in the plan to reduce the amount of data flow.\r\n\r\nThe design document was included in SPARK-17791.\r\n\r\n## How was this patch tested?\r\n\r\nA new test suite StarJoinSuite.scala was implemented.\r\n\r\n","created_at":"2016-10-05T22:41:28Z","updated_at":"2016-10-28T06:21:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d1b32cd6ac6336a94603537daf7496b5327ff5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/15363/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/15363/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/15363/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/9bddb86f89689406c1a0efb2a64f900609379d31","head":{"label":"ioana-delaney:starJoinReord2","ref":"starJoinReord2","sha":"9bddb86f89689406c1a0efb2a64f900609379d31","user":{"login":"ioana-delaney","id":17709782,"avatar_url":"https://avatars.githubusercontent.com/u/17709782?v=3","gravatar_id":"","url":"https://api.github.com/users/ioana-delaney","html_url":"https://github.com/ioana-delaney","followers_url":"https://api.github.com/users/ioana-delaney/followers","following_url":"https://api.github.com/users/ioana-delaney/following{/other_user}","gists_url":"https://api.github.com/users/ioana-delaney/gists{/gist_id}","starred_url":"https://api.github.com/users/ioana-delaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioana-delaney/subscriptions","organizations_url":"https://api.github.com/users/ioana-delaney/orgs","repos_url":"https://api.github.com/users/ioana-delaney/repos","events_url":"https://api.github.com/users/ioana-delaney/events{/privacy}","received_events_url":"https://api.github.com/users/ioana-delaney/received_events","type":"User","site_admin":false},"repo":{"id":53364696,"name":"spark","full_name":"ioana-delaney/spark","owner":{"login":"ioana-delaney","id":17709782,"avatar_url":"https://avatars.githubusercontent.com/u/17709782?v=3","gravatar_id":"","url":"https://api.github.com/users/ioana-delaney","html_url":"https://github.com/ioana-delaney","followers_url":"https://api.github.com/users/ioana-delaney/followers","following_url":"https://api.github.com/users/ioana-delaney/following{/other_user}","gists_url":"https://api.github.com/users/ioana-delaney/gists{/gist_id}","starred_url":"https://api.github.com/users/ioana-delaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioana-delaney/subscriptions","organizations_url":"https://api.github.com/users/ioana-delaney/orgs","repos_url":"https://api.github.com/users/ioana-delaney/repos","events_url":"https://api.github.com/users/ioana-delaney/events{/privacy}","received_events_url":"https://api.github.com/users/ioana-delaney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ioana-delaney/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/ioana-delaney/spark","forks_url":"https://api.github.com/repos/ioana-delaney/spark/forks","keys_url":"https://api.github.com/repos/ioana-delaney/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ioana-delaney/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ioana-delaney/spark/teams","hooks_url":"https://api.github.com/repos/ioana-delaney/spark/hooks","issue_events_url":"https://api.github.com/repos/ioana-delaney/spark/issues/events{/number}","events_url":"https://api.github.com/repos/ioana-delaney/spark/events","assignees_url":"https://api.github.com/repos/ioana-delaney/spark/assignees{/user}","branches_url":"https://api.github.com/repos/ioana-delaney/spark/branches{/branch}","tags_url":"https://api.github.com/repos/ioana-delaney/spark/tags","blobs_url":"https://api.github.com/repos/ioana-delaney/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ioana-delaney/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ioana-delaney/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/ioana-delaney/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ioana-delaney/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/ioana-delaney/spark/languages","stargazers_url":"https://api.github.com/repos/ioana-delaney/spark/stargazers","contributors_url":"https://api.github.com/repos/ioana-delaney/spark/contributors","subscribers_url":"https://api.github.com/repos/ioana-delaney/spark/subscribers","subscription_url":"https://api.github.com/repos/ioana-delaney/spark/subscription","commits_url":"https://api.github.com/repos/ioana-delaney/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/ioana-delaney/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/ioana-delaney/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/ioana-delaney/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/ioana-delaney/spark/contents/{+path}","compare_url":"https://api.github.com/repos/ioana-delaney/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ioana-delaney/spark/merges","archive_url":"https://api.github.com/repos/ioana-delaney/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ioana-delaney/spark/downloads","issues_url":"https://api.github.com/repos/ioana-delaney/spark/issues{/number}","pulls_url":"https://api.github.com/repos/ioana-delaney/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/ioana-delaney/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/ioana-delaney/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ioana-delaney/spark/labels{/name}","releases_url":"https://api.github.com/repos/ioana-delaney/spark/releases{/id}","deployments_url":"https://api.github.com/repos/ioana-delaney/spark/deployments","created_at":"2016-03-07T22:45:44Z","updated_at":"2016-03-07T22:46:12Z","pushed_at":"2016-10-24T20:41:55Z","git_url":"git://github.com/ioana-delaney/spark.git","ssh_url":"git@github.com:ioana-delaney/spark.git","clone_url":"https://github.com/ioana-delaney/spark.git","svn_url":"https://github.com/ioana-delaney/spark","homepage":null,"size":241819,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"4ecbe1b92f4c4c5b2d734895c09d8ded0ed48d4d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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://avatars.githubusercontent.com/u/47359?v=3","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":"2016-10-28T05:13:34Z","pushed_at":"2016-10-28T06:13:10Z","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":603814,"stargazers_count":10527,"watchers_count":10527,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9806,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":476,"forks":9806,"open_issues":476,"watchers":10527,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/15363"},"html":{"href":"https://github.com/apache/spark/pull/15363"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/15363"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/15363/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/15363/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/15363/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/9bddb86f89689406c1a0efb2a64f900609379d31"}}}}
{"actor":{"display_login":"ioana-delaney"}}