{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/29398363","id":29398363,"diff_hunk":"@@ -36,6 +36,13 @@ object DefaultOptimizer extends Optimizer {\n     // SubQueries are only needed for analysis and can be removed before execution.\n     Batch(\"Remove SubQueries\", FixedPoint(100),\n       EliminateSubQueries) ::\n+    Batch(\"Filter Pushdown\", FixedPoint(100),\n+      UnionPushdown,\n+      CombineFilters,\n+      PushPredicateThroughProject,\n+      PushPredicateThroughJoin,\n+      PushPredicateThroughGenerate,\n+      ColumnPruning) ::\n     Batch(\"Combine Limits\", FixedPoint(100),\n       CombineLimits) ::","path":"sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala","position":12,"original_position":12,"commit_id":"19ab87584a31bee534d0f8c2d4fec6417773e327","original_commit_id":"19ab87584a31bee534d0f8c2d4fec6417773e327","user":{"login":"rxin","id":323388,"avatar_url":"https://avatars.githubusercontent.com/u/323388?v=3","gravatar_id":"","url":"https://api.github.com/users/rxin","html_url":"https://github.com/rxin","followers_url":"https://api.github.com/users/rxin/followers","following_url":"https://api.github.com/users/rxin/following{/other_user}","gists_url":"https://api.github.com/users/rxin/gists{/gist_id}","starred_url":"https://api.github.com/users/rxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxin/subscriptions","organizations_url":"https://api.github.com/users/rxin/orgs","repos_url":"https://api.github.com/users/rxin/repos","events_url":"https://api.github.com/users/rxin/events{/privacy}","received_events_url":"https://api.github.com/users/rxin/received_events","type":"User","site_admin":false},"body":"(and rename \"Filter Pushdown\" into \"Operator Reordering\")","created_at":"2015-04-30T01:42:28Z","updated_at":"2015-04-30T01:42:28Z","html_url":"https://github.com/apache/spark/pull/5770#discussion_r29398363","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/5770","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/29398363"},"html":{"href":"https://github.com/apache/spark/pull/5770#discussion_r29398363"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/5770"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5770","id":34336158,"html_url":"https://github.com/apache/spark/pull/5770","diff_url":"https://github.com/apache/spark/pull/5770.diff","patch_url":"https://github.com/apache/spark/pull/5770.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/5770","number":5770,"state":"open","locked":false,"title":"[SPARK-7225][SQL] CombineLimits optimizer does not work","user":{"login":"DoingDone9","id":7529754,"avatar_url":"https://avatars.githubusercontent.com/u/7529754?v=3","gravatar_id":"","url":"https://api.github.com/users/DoingDone9","html_url":"https://github.com/DoingDone9","followers_url":"https://api.github.com/users/DoingDone9/followers","following_url":"https://api.github.com/users/DoingDone9/following{/other_user}","gists_url":"https://api.github.com/users/DoingDone9/gists{/gist_id}","starred_url":"https://api.github.com/users/DoingDone9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoingDone9/subscriptions","organizations_url":"https://api.github.com/users/DoingDone9/orgs","repos_url":"https://api.github.com/users/DoingDone9/repos","events_url":"https://api.github.com/users/DoingDone9/events{/privacy}","received_events_url":"https://api.github.com/users/DoingDone9/received_events","type":"User","site_admin":false},"body":"SQL \r\n```\r\nselect key from (select key from src limit 100) t2 limit 10\r\n```\r\nOptimized Logical Plan before modifying\r\n```\r\n== Optimized Logical Plan ==\r\nLimit 10\r\nLimit 100\r\nProject key#3\r\nMetastoreRelation default, src, None\r\n```\r\nOptimized Logical Plan after modifying\r\n```\r\n== Optimized Logical Plan ==\r\nLimit 10\r\n Project [key#1]\r\n  MetastoreRelation default, src, None\r\n```","created_at":"2015-04-29T06:27:03Z","updated_at":"2015-04-30T01:42:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5b6a8fe562afbc0603201f0d551d0f03d5628c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/5770/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/5770/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/5770/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/19ab87584a31bee534d0f8c2d4fec6417773e327","head":{"label":"DoingDone9:limitOptimizer","ref":"limitOptimizer","sha":"19ab87584a31bee534d0f8c2d4fec6417773e327","user":{"login":"DoingDone9","id":7529754,"avatar_url":"https://avatars.githubusercontent.com/u/7529754?v=3","gravatar_id":"","url":"https://api.github.com/users/DoingDone9","html_url":"https://github.com/DoingDone9","followers_url":"https://api.github.com/users/DoingDone9/followers","following_url":"https://api.github.com/users/DoingDone9/following{/other_user}","gists_url":"https://api.github.com/users/DoingDone9/gists{/gist_id}","starred_url":"https://api.github.com/users/DoingDone9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoingDone9/subscriptions","organizations_url":"https://api.github.com/users/DoingDone9/orgs","repos_url":"https://api.github.com/users/DoingDone9/repos","events_url":"https://api.github.com/users/DoingDone9/events{/privacy}","received_events_url":"https://api.github.com/users/DoingDone9/received_events","type":"User","site_admin":false},"repo":{"id":30402760,"name":"spark","full_name":"DoingDone9/spark","owner":{"login":"DoingDone9","id":7529754,"avatar_url":"https://avatars.githubusercontent.com/u/7529754?v=3","gravatar_id":"","url":"https://api.github.com/users/DoingDone9","html_url":"https://github.com/DoingDone9","followers_url":"https://api.github.com/users/DoingDone9/followers","following_url":"https://api.github.com/users/DoingDone9/following{/other_user}","gists_url":"https://api.github.com/users/DoingDone9/gists{/gist_id}","starred_url":"https://api.github.com/users/DoingDone9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoingDone9/subscriptions","organizations_url":"https://api.github.com/users/DoingDone9/orgs","repos_url":"https://api.github.com/users/DoingDone9/repos","events_url":"https://api.github.com/users/DoingDone9/events{/privacy}","received_events_url":"https://api.github.com/users/DoingDone9/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DoingDone9/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/DoingDone9/spark","forks_url":"https://api.github.com/repos/DoingDone9/spark/forks","keys_url":"https://api.github.com/repos/DoingDone9/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoingDone9/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoingDone9/spark/teams","hooks_url":"https://api.github.com/repos/DoingDone9/spark/hooks","issue_events_url":"https://api.github.com/repos/DoingDone9/spark/issues/events{/number}","events_url":"https://api.github.com/repos/DoingDone9/spark/events","assignees_url":"https://api.github.com/repos/DoingDone9/spark/assignees{/user}","branches_url":"https://api.github.com/repos/DoingDone9/spark/branches{/branch}","tags_url":"https://api.github.com/repos/DoingDone9/spark/tags","blobs_url":"https://api.github.com/repos/DoingDone9/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoingDone9/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoingDone9/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoingDone9/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoingDone9/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/DoingDone9/spark/languages","stargazers_url":"https://api.github.com/repos/DoingDone9/spark/stargazers","contributors_url":"https://api.github.com/repos/DoingDone9/spark/contributors","subscribers_url":"https://api.github.com/repos/DoingDone9/spark/subscribers","subscription_url":"https://api.github.com/repos/DoingDone9/spark/subscription","commits_url":"https://api.github.com/repos/DoingDone9/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoingDone9/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoingDone9/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoingDone9/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoingDone9/spark/contents/{+path}","compare_url":"https://api.github.com/repos/DoingDone9/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoingDone9/spark/merges","archive_url":"https://api.github.com/repos/DoingDone9/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoingDone9/spark/downloads","issues_url":"https://api.github.com/repos/DoingDone9/spark/issues{/number}","pulls_url":"https://api.github.com/repos/DoingDone9/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/DoingDone9/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/DoingDone9/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoingDone9/spark/labels{/name}","releases_url":"https://api.github.com/repos/DoingDone9/spark/releases{/id}","created_at":"2015-02-06T08:34:14Z","updated_at":"2015-04-29T06:18:01Z","pushed_at":"2015-04-30T01:27:08Z","git_url":"git://github.com/DoingDone9/spark.git","ssh_url":"git@github.com:DoingDone9/spark.git","clone_url":"https://github.com/DoingDone9/spark.git","svn_url":"https://github.com/DoingDone9/spark","homepage":null,"size":102169,"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":"f98773a90ded0e408af6bbd85fafbaffbc5b825f","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}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-04-30T01:02:09Z","pushed_at":"2015-04-30T01:30:15Z","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":1585528,"stargazers_count":3798,"watchers_count":3798,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3301,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":303,"forks":3301,"open_issues":303,"watchers":3798,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/5770"},"html":{"href":"https://github.com/apache/spark/pull/5770"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/5770"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/5770/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/5770/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/5770/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/19ab87584a31bee534d0f8c2d4fec6417773e327"}}}}