{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/191758247","pull_request_review_id":124370263,"id":191758247,"diff_hunk":"@@ -318,10 +318,8 @@ else if (leftNDV <= matchingRightNDV) {\n             return UNKNOWN_STATS;\n         }\n \n-        // account for remaining clauses\n-        for (int i = 0; i < remainingClauses.size(); ++i) {\n-            result = result.mapOutputRowCount(rowCount -> min(leftStats.getOutputRowCount(), rowCount / UNKNOWN_FILTER_COEFFICIENT));\n-        }\n+        // limit the number of complement rows (to left row count) and account for remaining clauses\n+        result = result.mapOutputRowCount(rowCount -> min(leftStats.getOutputRowCount(), rowCount / Math.pow(UNKNOWN_FILTER_COEFFICIENT, numberOfRemainingClauses)));","path":"presto-main/src/main/java/com/facebook/presto/cost/JoinStatsRule.java","position":64,"original_position":64,"commit_id":"545e5feb509e4f10dfc2c950e33e07fba2c77837","original_commit_id":"545e5feb509e4f10dfc2c950e33e07fba2c77837","user":{"login":"sopel39","id":5989165,"avatar_url":"https://avatars1.githubusercontent.com/u/5989165?v=4","gravatar_id":"","url":"https://api.github.com/users/sopel39","html_url":"https://github.com/sopel39","followers_url":"https://api.github.com/users/sopel39/followers","following_url":"https://api.github.com/users/sopel39/following{/other_user}","gists_url":"https://api.github.com/users/sopel39/gists{/gist_id}","starred_url":"https://api.github.com/users/sopel39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sopel39/subscriptions","organizations_url":"https://api.github.com/users/sopel39/orgs","repos_url":"https://api.github.com/users/sopel39/repos","events_url":"https://api.github.com/users/sopel39/events{/privacy}","received_events_url":"https://api.github.com/users/sopel39/received_events","type":"User","site_admin":false},"body":"> This also affects equijoins with 3+ criteria. Did you notice any effect on those kinds of queries?\r\n\r\nThe code treats equicriteria the same as it was before this change. I just unified how non-equi criteria are treated.","created_at":"2018-05-30T13:04:11Z","updated_at":"2018-05-30T13:13:10Z","html_url":"https://github.com/prestodb/presto/pull/10711#discussion_r191758247","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/10711","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/191758247"},"html":{"href":"https://github.com/prestodb/presto/pull/10711#discussion_r191758247"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10711"}},"in_reply_to_id":190970225},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/10711","id":190624625,"html_url":"https://github.com/prestodb/presto/pull/10711","diff_url":"https://github.com/prestodb/presto/pull/10711.diff","patch_url":"https://github.com/prestodb/presto/pull/10711.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/10711","number":10711,"state":"open","locked":false,"title":"Add support for assign unique id node and filter in our join stats","user":{"login":"sopel39","id":5989165,"avatar_url":"https://avatars1.githubusercontent.com/u/5989165?v=4","gravatar_id":"","url":"https://api.github.com/users/sopel39","html_url":"https://github.com/sopel39","followers_url":"https://api.github.com/users/sopel39/followers","following_url":"https://api.github.com/users/sopel39/following{/other_user}","gists_url":"https://api.github.com/users/sopel39/gists{/gist_id}","starred_url":"https://api.github.com/users/sopel39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sopel39/subscriptions","organizations_url":"https://api.github.com/users/sopel39/orgs","repos_url":"https://api.github.com/users/sopel39/repos","events_url":"https://api.github.com/users/sopel39/events{/privacy}","received_events_url":"https://api.github.com/users/sopel39/received_events","type":"User","site_admin":false},"body":"Q21 before:\r\n```\r\n- LeftJoin[(\"orderkey\" = \"orderkey_10\") AND (\"suppkey_12\" <> \"suppkey_0\")][$hashvalue_204, $hashv\r\n        Distribution: REPLICATED\r\n        Cost: {rows: 2450757425 (228.24GB), cpu: 2391276411339.29, memory: 255027000671.95, netwo\r\n    - Project[] => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:date, name:va\r\n            Cost: {rows: 296052124 (27.57GB), cpu: 1276596897180.48, memory: 15027412311.95, netw\r\n            $hashvalue_204 := \"combine_hash\"(BIGINT '0', COALESCE(\"$operator$hash_code\"(\"orderkey\r\n        - AssignUniqueId => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:date\r\n                Cost: {rows: 296052124 (24.81GB), cpu: 1246991684800.55, memory: 15027412311.95,\r\n            - Project[] => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:date,\r\n                    Cost: {rows: 296052124 (22.06GB), cpu: 1244623267810.15, memory: 15027412311.\r\n                - InnerJoin[(\"orderkey\" = \"orderkey_3\")][$hashvalue_201, $hashvalue_202] => [orde\r\n                        Distribution: REPLICATED\r\n                        Cost: {rows: 296052124 (24.81GB), cpu: 1220939097906.21, memory: 15027412\r\n                        ...\r\n    - LocalExchange[HASH][$hashvalue_205] (\"orderkey_10\") => suppkey_12:bigint, orderkey_10:bigin\r\n            Cost: {rows: 5999989709 (223.52GB), cpu: 599998970900.00, memory: 0.00, network: 0.00\r\n        - ScanProject[table = hive:tpch_sf1000_orc:lineitem, originalConstraint = true] => [suppk\r\n                Cost: {rows: 5999989709 (111.76GB), cpu: 119999794180.00, memory: 0.00, network:\r\n                non_null_188 := true\r\n                $hashvalue_206 := \"combine_hash\"(BIGINT '0', COALESCE(\"$operator$hash_code\"(\"orde\r\n                LAYOUT: tpch_sf1000_orc.lineitem\r\n                suppkey_12 := HiveColumnHandle{name=suppkey, hiveType=bigint, hiveColumnIndex=2,\r\n```\r\nafter:\r\n```\r\n- RightJoin[(\"orderkey_10\" = \"orderkey\") AND (\"suppkey_12\" <> \"suppkey_0\")][$hashvalue_195, $hash\r\n        Distribution: PARTITIONED\r\n        Cost: {rows: 2450757425 (228.24GB), cpu: 2181375456974.36, memory: 44879335499.45, networ\r\n    - ScanProject[table = hive:tpch_sf1000_orc:lineitem, originalConstraint = true] => [suppkey_1\r\n            Cost: {rows: 5999989709 (111.76GB), cpu: 119999794180.00, memory: 0.00, network: 0.00\r\n            non_null_188 := true\r\n            $hashvalue_195 := \"combine_hash\"(BIGINT '0', COALESCE(\"$operator$hash_code\"(\"orderkey\r\n            LAYOUT: tpch_sf1000_orc.lineitem\r\n            suppkey_12 := HiveColumnHandle{name=suppkey, hiveType=bigint, hiveColumnIndex=2, colu\r\n            orderkey_10 := HiveColumnHandle{name=orderkey, hiveType=bigint, hiveColumnIndex=0, co\r\n    - LocalExchange[HASH][$hashvalue_196] (\"orderkey\") => orderkey:bigint, suppkey_0:bigint, comm\r\n            Cost: {rows: 296052124 (27.57GB), cpu: 1306695531175.55, memory: 15274123119.52, netw\r\n        - Project[] => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:date, nam\r\n                Cost: {rows: 296052124 (27.57GB), cpu: 1277090318795.61, memory: 15274123119.52,\r\n                $hashvalue_206 := \"combine_hash\"(BIGINT '0', COALESCE(\"$operator$hash_code\"(\"orde\r\n            - AssignUniqueId => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:\r\n                    Cost: {rows: 296052124 (24.81GB), cpu: 1247485106415.68, memory: 15274123119.\r\n                - Project[] => [orderkey:bigint, suppkey_0:bigint, commitdate:date, receiptdate:d\r\n                        Cost: {rows: 296052124 (22.06GB), cpu: 1245116689425.29, memory: 15274123\r\n                    - InnerJoin[(\"orderkey\" = \"orderkey_3\")][$hashvalue_203, $hashvalue_204] => [\r\n                            Distribution: PARTITIONED\r\n                            Cost: {rows: 296052124 (24.81GB), cpu: 1221432519521.34, memory: 1527\r\n                        - Project[] => [orderkey:bigint, suppkey_0:bigint, commitdate:date, recei\r\n                                Cost: {rows: 296052124 (22.06GB), cpu: 1066103658475.45, memory:\r\n                                $hashvalue_203 := \"combine_hash\"(BIGINT '0', COALESCE(\"$operator$\r\n```\r\n\r\nBasically outer join sides were not flipped.","created_at":"2018-05-25T15:33:26Z","updated_at":"2018-05-30T13:13:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be98f10581ac2a64e67a58c54967c78df2672182","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":196992743,"url":"https://api.github.com/repos/prestodb/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/10711/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/10711/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/10711/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/545e5feb509e4f10dfc2c950e33e07fba2c77837","head":{"label":"starburstdata:ks/filter_outer_join_stats","ref":"ks/filter_outer_join_stats","sha":"545e5feb509e4f10dfc2c950e33e07fba2c77837","user":{"login":"starburstdata","id":33209422,"avatar_url":"https://avatars3.githubusercontent.com/u/33209422?v=4","gravatar_id":"","url":"https://api.github.com/users/starburstdata","html_url":"https://github.com/starburstdata","followers_url":"https://api.github.com/users/starburstdata/followers","following_url":"https://api.github.com/users/starburstdata/following{/other_user}","gists_url":"https://api.github.com/users/starburstdata/gists{/gist_id}","starred_url":"https://api.github.com/users/starburstdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starburstdata/subscriptions","organizations_url":"https://api.github.com/users/starburstdata/orgs","repos_url":"https://api.github.com/users/starburstdata/repos","events_url":"https://api.github.com/users/starburstdata/events{/privacy}","received_events_url":"https://api.github.com/users/starburstdata/received_events","type":"Organization","site_admin":false},"repo":{"id":108882128,"name":"presto","full_name":"starburstdata/presto","owner":{"login":"starburstdata","id":33209422,"avatar_url":"https://avatars3.githubusercontent.com/u/33209422?v=4","gravatar_id":"","url":"https://api.github.com/users/starburstdata","html_url":"https://github.com/starburstdata","followers_url":"https://api.github.com/users/starburstdata/followers","following_url":"https://api.github.com/users/starburstdata/following{/other_user}","gists_url":"https://api.github.com/users/starburstdata/gists{/gist_id}","starred_url":"https://api.github.com/users/starburstdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starburstdata/subscriptions","organizations_url":"https://api.github.com/users/starburstdata/orgs","repos_url":"https://api.github.com/users/starburstdata/repos","events_url":"https://api.github.com/users/starburstdata/events{/privacy}","received_events_url":"https://api.github.com/users/starburstdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starburstdata/presto","description":"Starburst Enterprise Distribution of Presto","fork":true,"url":"https://api.github.com/repos/starburstdata/presto","forks_url":"https://api.github.com/repos/starburstdata/presto/forks","keys_url":"https://api.github.com/repos/starburstdata/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starburstdata/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starburstdata/presto/teams","hooks_url":"https://api.github.com/repos/starburstdata/presto/hooks","issue_events_url":"https://api.github.com/repos/starburstdata/presto/issues/events{/number}","events_url":"https://api.github.com/repos/starburstdata/presto/events","assignees_url":"https://api.github.com/repos/starburstdata/presto/assignees{/user}","branches_url":"https://api.github.com/repos/starburstdata/presto/branches{/branch}","tags_url":"https://api.github.com/repos/starburstdata/presto/tags","blobs_url":"https://api.github.com/repos/starburstdata/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starburstdata/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starburstdata/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/starburstdata/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starburstdata/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/starburstdata/presto/languages","stargazers_url":"https://api.github.com/repos/starburstdata/presto/stargazers","contributors_url":"https://api.github.com/repos/starburstdata/presto/contributors","subscribers_url":"https://api.github.com/repos/starburstdata/presto/subscribers","subscription_url":"https://api.github.com/repos/starburstdata/presto/subscription","commits_url":"https://api.github.com/repos/starburstdata/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/starburstdata/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/starburstdata/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/starburstdata/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/starburstdata/presto/contents/{+path}","compare_url":"https://api.github.com/repos/starburstdata/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starburstdata/presto/merges","archive_url":"https://api.github.com/repos/starburstdata/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starburstdata/presto/downloads","issues_url":"https://api.github.com/repos/starburstdata/presto/issues{/number}","pulls_url":"https://api.github.com/repos/starburstdata/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/starburstdata/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/starburstdata/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starburstdata/presto/labels{/name}","releases_url":"https://api.github.com/repos/starburstdata/presto/releases{/id}","deployments_url":"https://api.github.com/repos/starburstdata/presto/deployments","created_at":"2017-10-30T17:05:09Z","updated_at":"2018-05-29T23:27:17Z","pushed_at":"2018-05-30T10:22:25Z","git_url":"git://github.com/starburstdata/presto.git","ssh_url":"git@github.com:starburstdata/presto.git","clone_url":"https://github.com/starburstdata/presto.git","svn_url":"https://github.com/starburstdata/presto","homepage":"https://www.starburstdata.com","size":95732,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":3,"watchers":28,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"93b2be68255b537faca9c9ddf4db2659293f3465","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2018-05-30T08:24:53Z","pushed_at":"2018-05-30T10:51:31Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":91799,"stargazers_count":7562,"watchers_count":7562,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2536,"mirror_url":null,"archived":false,"open_issues_count":1302,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2536,"open_issues":1302,"watchers":7562,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10711"},"html":{"href":"https://github.com/prestodb/presto/pull/10711"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/10711"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/10711/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10711/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/10711/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/545e5feb509e4f10dfc2c950e33e07fba2c77837"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sopel39"}}