{"action":"created","comment":{"url":"https://api.github.com/repos/dato-code/SFrame/pulls/comments/63972523","id":63972523,"diff_hunk":"@@ -99,10 +104,23 @@ class opt_union_on_source : public opt_union_transform {\n           size_t begin_index = n->inputs[i]->p(\"begin_index\");\n           size_t end_index   = n->inputs[i]->p(\"end_index\");\n \n-          distinct_input_ranges.insert({begin_index, end_index});\n+          size_t size = 0;\n+\n+          if(t == planner_node_type::SFRAME_SOURCE_NODE) {\n+            // Get the size of the sframe\n+            size = n->inputs[i]->any_p<sframe>(\"sframe\").num_rows();\n+          } else {\n+            // Get the size of the sarray","path":"oss_src/sframe_query_engine/planning/optimizations/union_transforms.hpp","position":26,"original_position":26,"commit_id":"827644397e394aa6e925c8ae58e3d4c161c78e39","original_commit_id":"827644397e394aa6e925c8ae58e3d4c161c78e39","user":{"login":"hoytak","id":56061,"avatar_url":"https://avatars.githubusercontent.com/u/56061?v=3","gravatar_id":"","url":"https://api.github.com/users/hoytak","html_url":"https://github.com/hoytak","followers_url":"https://api.github.com/users/hoytak/followers","following_url":"https://api.github.com/users/hoytak/following{/other_user}","gists_url":"https://api.github.com/users/hoytak/gists{/gist_id}","starred_url":"https://api.github.com/users/hoytak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoytak/subscriptions","organizations_url":"https://api.github.com/users/hoytak/orgs","repos_url":"https://api.github.com/users/hoytak/repos","events_url":"https://api.github.com/users/hoytak/events{/privacy}","received_events_url":"https://api.github.com/users/hoytak/received_events","type":"User","site_admin":false},"body":"Yes, it can have dozens of types, but the others are excluded (they don't apply to this transform) by the if statement in lines 96/101 and 97/102.  Both of these have a common set of parameters, minus retrieving the size. ","created_at":"2016-05-19T23:51:57Z","updated_at":"2016-05-19T23:51:57Z","html_url":"https://github.com/dato-code/SFrame/pull/317#discussion_r63972523","pull_request_url":"https://api.github.com/repos/dato-code/SFrame/pulls/317","_links":{"self":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/comments/63972523"},"html":{"href":"https://github.com/dato-code/SFrame/pull/317#discussion_r63972523"},"pull_request":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/317"}}},"pull_request":{"url":"https://api.github.com/repos/dato-code/SFrame/pulls/317","id":70782246,"html_url":"https://github.com/dato-code/SFrame/pull/317","diff_url":"https://github.com/dato-code/SFrame/pull/317.diff","patch_url":"https://github.com/dato-code/SFrame/pull/317.patch","issue_url":"https://api.github.com/repos/dato-code/SFrame/issues/317","number":317,"state":"open","locked":false,"title":"Bugfix for slicing optimization operator error.","user":{"login":"hoytak","id":56061,"avatar_url":"https://avatars.githubusercontent.com/u/56061?v=3","gravatar_id":"","url":"https://api.github.com/users/hoytak","html_url":"https://github.com/hoytak","followers_url":"https://api.github.com/users/hoytak/followers","following_url":"https://api.github.com/users/hoytak/following{/other_user}","gists_url":"https://api.github.com/users/hoytak/gists{/gist_id}","starred_url":"https://api.github.com/users/hoytak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoytak/subscriptions","organizations_url":"https://api.github.com/users/hoytak/orgs","repos_url":"https://api.github.com/users/hoytak/repos","events_url":"https://api.github.com/users/hoytak/events{/privacy}","received_events_url":"https://api.github.com/users/hoytak/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-19T23:36:46Z","updated_at":"2016-05-19T23:51:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e06307e2b6c8b41599193e1c98f8a2a689ade8ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dato-code/SFrame/pulls/317/commits","review_comments_url":"https://api.github.com/repos/dato-code/SFrame/pulls/317/comments","review_comment_url":"https://api.github.com/repos/dato-code/SFrame/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dato-code/SFrame/issues/317/comments","statuses_url":"https://api.github.com/repos/dato-code/SFrame/statuses/827644397e394aa6e925c8ae58e3d4c161c78e39","head":{"label":"hoytak:optimization-fix-size-correctness-and-a-hypersquirrel","ref":"optimization-fix-size-correctness-and-a-hypersquirrel","sha":"827644397e394aa6e925c8ae58e3d4c161c78e39","user":{"login":"hoytak","id":56061,"avatar_url":"https://avatars.githubusercontent.com/u/56061?v=3","gravatar_id":"","url":"https://api.github.com/users/hoytak","html_url":"https://github.com/hoytak","followers_url":"https://api.github.com/users/hoytak/followers","following_url":"https://api.github.com/users/hoytak/following{/other_user}","gists_url":"https://api.github.com/users/hoytak/gists{/gist_id}","starred_url":"https://api.github.com/users/hoytak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoytak/subscriptions","organizations_url":"https://api.github.com/users/hoytak/orgs","repos_url":"https://api.github.com/users/hoytak/repos","events_url":"https://api.github.com/users/hoytak/events{/privacy}","received_events_url":"https://api.github.com/users/hoytak/received_events","type":"User","site_admin":false},"repo":{"id":42884758,"name":"SFrame","full_name":"hoytak/SFrame","owner":{"login":"hoytak","id":56061,"avatar_url":"https://avatars.githubusercontent.com/u/56061?v=3","gravatar_id":"","url":"https://api.github.com/users/hoytak","html_url":"https://github.com/hoytak","followers_url":"https://api.github.com/users/hoytak/followers","following_url":"https://api.github.com/users/hoytak/following{/other_user}","gists_url":"https://api.github.com/users/hoytak/gists{/gist_id}","starred_url":"https://api.github.com/users/hoytak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoytak/subscriptions","organizations_url":"https://api.github.com/users/hoytak/orgs","repos_url":"https://api.github.com/users/hoytak/repos","events_url":"https://api.github.com/users/hoytak/events{/privacy}","received_events_url":"https://api.github.com/users/hoytak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoytak/SFrame","description":"SFrame, SArray, SGraph","fork":true,"url":"https://api.github.com/repos/hoytak/SFrame","forks_url":"https://api.github.com/repos/hoytak/SFrame/forks","keys_url":"https://api.github.com/repos/hoytak/SFrame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoytak/SFrame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoytak/SFrame/teams","hooks_url":"https://api.github.com/repos/hoytak/SFrame/hooks","issue_events_url":"https://api.github.com/repos/hoytak/SFrame/issues/events{/number}","events_url":"https://api.github.com/repos/hoytak/SFrame/events","assignees_url":"https://api.github.com/repos/hoytak/SFrame/assignees{/user}","branches_url":"https://api.github.com/repos/hoytak/SFrame/branches{/branch}","tags_url":"https://api.github.com/repos/hoytak/SFrame/tags","blobs_url":"https://api.github.com/repos/hoytak/SFrame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoytak/SFrame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoytak/SFrame/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoytak/SFrame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoytak/SFrame/statuses/{sha}","languages_url":"https://api.github.com/repos/hoytak/SFrame/languages","stargazers_url":"https://api.github.com/repos/hoytak/SFrame/stargazers","contributors_url":"https://api.github.com/repos/hoytak/SFrame/contributors","subscribers_url":"https://api.github.com/repos/hoytak/SFrame/subscribers","subscription_url":"https://api.github.com/repos/hoytak/SFrame/subscription","commits_url":"https://api.github.com/repos/hoytak/SFrame/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoytak/SFrame/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoytak/SFrame/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoytak/SFrame/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoytak/SFrame/contents/{+path}","compare_url":"https://api.github.com/repos/hoytak/SFrame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoytak/SFrame/merges","archive_url":"https://api.github.com/repos/hoytak/SFrame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoytak/SFrame/downloads","issues_url":"https://api.github.com/repos/hoytak/SFrame/issues{/number}","pulls_url":"https://api.github.com/repos/hoytak/SFrame/pulls{/number}","milestones_url":"https://api.github.com/repos/hoytak/SFrame/milestones{/number}","notifications_url":"https://api.github.com/repos/hoytak/SFrame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoytak/SFrame/labels{/name}","releases_url":"https://api.github.com/repos/hoytak/SFrame/releases{/id}","deployments_url":"https://api.github.com/repos/hoytak/SFrame/deployments","created_at":"2015-09-21T18:12:07Z","updated_at":"2016-03-15T20:43:27Z","pushed_at":"2016-05-19T23:24:59Z","git_url":"git://github.com/hoytak/SFrame.git","ssh_url":"git@github.com:hoytak/SFrame.git","clone_url":"https://github.com/hoytak/SFrame.git","svn_url":"https://github.com/hoytak/SFrame","homepage":null,"size":4972,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"dato-code:master","ref":"master","sha":"4882e15d4ab744de7aa91f7070fed72aaa9c9deb","user":{"login":"dato-code","id":10378005,"avatar_url":"https://avatars.githubusercontent.com/u/10378005?v=3","gravatar_id":"","url":"https://api.github.com/users/dato-code","html_url":"https://github.com/dato-code","followers_url":"https://api.github.com/users/dato-code/followers","following_url":"https://api.github.com/users/dato-code/following{/other_user}","gists_url":"https://api.github.com/users/dato-code/gists{/gist_id}","starred_url":"https://api.github.com/users/dato-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dato-code/subscriptions","organizations_url":"https://api.github.com/users/dato-code/orgs","repos_url":"https://api.github.com/users/dato-code/repos","events_url":"https://api.github.com/users/dato-code/events{/privacy}","received_events_url":"https://api.github.com/users/dato-code/received_events","type":"Organization","site_admin":false},"repo":{"id":41886367,"name":"SFrame","full_name":"dato-code/SFrame","owner":{"login":"dato-code","id":10378005,"avatar_url":"https://avatars.githubusercontent.com/u/10378005?v=3","gravatar_id":"","url":"https://api.github.com/users/dato-code","html_url":"https://github.com/dato-code","followers_url":"https://api.github.com/users/dato-code/followers","following_url":"https://api.github.com/users/dato-code/following{/other_user}","gists_url":"https://api.github.com/users/dato-code/gists{/gist_id}","starred_url":"https://api.github.com/users/dato-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dato-code/subscriptions","organizations_url":"https://api.github.com/users/dato-code/orgs","repos_url":"https://api.github.com/users/dato-code/repos","events_url":"https://api.github.com/users/dato-code/events{/privacy}","received_events_url":"https://api.github.com/users/dato-code/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dato-code/SFrame","description":"SFrame, SArray, SGraph","fork":false,"url":"https://api.github.com/repos/dato-code/SFrame","forks_url":"https://api.github.com/repos/dato-code/SFrame/forks","keys_url":"https://api.github.com/repos/dato-code/SFrame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dato-code/SFrame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dato-code/SFrame/teams","hooks_url":"https://api.github.com/repos/dato-code/SFrame/hooks","issue_events_url":"https://api.github.com/repos/dato-code/SFrame/issues/events{/number}","events_url":"https://api.github.com/repos/dato-code/SFrame/events","assignees_url":"https://api.github.com/repos/dato-code/SFrame/assignees{/user}","branches_url":"https://api.github.com/repos/dato-code/SFrame/branches{/branch}","tags_url":"https://api.github.com/repos/dato-code/SFrame/tags","blobs_url":"https://api.github.com/repos/dato-code/SFrame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dato-code/SFrame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dato-code/SFrame/git/refs{/sha}","trees_url":"https://api.github.com/repos/dato-code/SFrame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dato-code/SFrame/statuses/{sha}","languages_url":"https://api.github.com/repos/dato-code/SFrame/languages","stargazers_url":"https://api.github.com/repos/dato-code/SFrame/stargazers","contributors_url":"https://api.github.com/repos/dato-code/SFrame/contributors","subscribers_url":"https://api.github.com/repos/dato-code/SFrame/subscribers","subscription_url":"https://api.github.com/repos/dato-code/SFrame/subscription","commits_url":"https://api.github.com/repos/dato-code/SFrame/commits{/sha}","git_commits_url":"https://api.github.com/repos/dato-code/SFrame/git/commits{/sha}","comments_url":"https://api.github.com/repos/dato-code/SFrame/comments{/number}","issue_comment_url":"https://api.github.com/repos/dato-code/SFrame/issues/comments{/number}","contents_url":"https://api.github.com/repos/dato-code/SFrame/contents/{+path}","compare_url":"https://api.github.com/repos/dato-code/SFrame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dato-code/SFrame/merges","archive_url":"https://api.github.com/repos/dato-code/SFrame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dato-code/SFrame/downloads","issues_url":"https://api.github.com/repos/dato-code/SFrame/issues{/number}","pulls_url":"https://api.github.com/repos/dato-code/SFrame/pulls{/number}","milestones_url":"https://api.github.com/repos/dato-code/SFrame/milestones{/number}","notifications_url":"https://api.github.com/repos/dato-code/SFrame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dato-code/SFrame/labels{/name}","releases_url":"https://api.github.com/repos/dato-code/SFrame/releases{/id}","deployments_url":"https://api.github.com/repos/dato-code/SFrame/deployments","created_at":"2015-09-03T22:14:14Z","updated_at":"2016-05-19T01:11:16Z","pushed_at":"2016-05-19T23:36:46Z","git_url":"git://github.com/dato-code/SFrame.git","ssh_url":"git@github.com:dato-code/SFrame.git","clone_url":"https://github.com/dato-code/SFrame.git","svn_url":"https://github.com/dato-code/SFrame","homepage":null,"size":5129,"stargazers_count":452,"watchers_count":452,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":157,"mirror_url":null,"open_issues_count":50,"forks":157,"open_issues":50,"watchers":452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/317"},"html":{"href":"https://github.com/dato-code/SFrame/pull/317"},"issue":{"href":"https://api.github.com/repos/dato-code/SFrame/issues/317"},"comments":{"href":"https://api.github.com/repos/dato-code/SFrame/issues/317/comments"},"review_comments":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/317/comments"},"review_comment":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dato-code/SFrame/pulls/317/commits"},"statuses":{"href":"https://api.github.com/repos/dato-code/SFrame/statuses/827644397e394aa6e925c8ae58e3d4c161c78e39"}}}}
{"actor":{"display_login":"hoytak"}}