{"action":"created","comment":{"url":"https://api.github.com/repos/weld-project/weld/pulls/comments/141972835","pull_request_review_id":66274979,"id":141972835,"diff_hunk":"@@ -232,40 +245,91 @@ pub fn get_id_element(sk: &ScalarKind, op: &BinOpKind) -> WeldResult<Option<Expr\n             return Ok(None);\n         }\n     };\n-    \n+\n     Ok(Some(identity))\n }\n \n+fn make_select_for_kv(cond:  Expr<Type>,\n+                      kv:    Expr<Type>,\n+                      ident: Expr<Type>) -> WeldResult<Option<Expr<Type>>> {\n+    if let MakeStruct{ ref elems } = kv.kind {\n+        let mut sym_gen = SymbolGenerator::from_expression(&kv);\n+        let name = sym_gen.new_symbol(\"k\");\n+        let kv_true = exprs::makestruct_expr(vec![elems[0].clone(), elems[1].clone()])?;","path":"weld/vectorizer.rs","position":190,"original_position":190,"commit_id":"4702d01877c1381ba31bd81c04ce90e3550dbf58","original_commit_id":"4702d01877c1381ba31bd81c04ce90e3550dbf58","user":{"login":"sppalkia","id":1360483,"avatar_url":"https://avatars0.githubusercontent.com/u/1360483?v=4","gravatar_id":"","url":"https://api.github.com/users/sppalkia","html_url":"https://github.com/sppalkia","followers_url":"https://api.github.com/users/sppalkia/followers","following_url":"https://api.github.com/users/sppalkia/following{/other_user}","gists_url":"https://api.github.com/users/sppalkia/gists{/gist_id}","starred_url":"https://api.github.com/users/sppalkia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sppalkia/subscriptions","organizations_url":"https://api.github.com/users/sppalkia/orgs","repos_url":"https://api.github.com/users/sppalkia/repos","events_url":"https://api.github.com/users/sppalkia/events{/privacy}","received_events_url":"https://api.github.com/users/sppalkia/received_events","type":"User","site_admin":false},"body":"This needs a slight modification: change it to:\r\n\r\n```rust\r\n let kv_struct = exprs::ident_expr(name, kv.ty.clone())?;\r\n let kv_true = kv_struct.clone(); // use the original\r\n let kv_ident = exprs::makestruct_expr(vec![exprs::getfield_expr(kv_struct, 0)?, ident])?; // use the original key and the identity as the value\r\n```\r\n\r\nRight now the key is still being copied since the name isn't actually being used - same with value, since the `Let` expression evaluates `kv`, and then `elems[0]` and `elems[1]` are being pulled out and re-evaluted.\r\n\r\n","created_at":"2017-09-29T21:31:45Z","updated_at":"2017-09-29T21:35:25Z","html_url":"https://github.com/weld-project/weld/pull/234#discussion_r141972835","pull_request_url":"https://api.github.com/repos/weld-project/weld/pulls/234","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/weld-project/weld/pulls/comments/141972835"},"html":{"href":"https://github.com/weld-project/weld/pull/234#discussion_r141972835"},"pull_request":{"href":"https://api.github.com/repos/weld-project/weld/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/weld-project/weld/pulls/234","id":142695484,"html_url":"https://github.com/weld-project/weld/pull/234","diff_url":"https://github.com/weld-project/weld/pull/234.diff","patch_url":"https://github.com/weld-project/weld/pull/234.patch","issue_url":"https://api.github.com/repos/weld-project/weld/issues/234","number":234,"state":"open","locked":false,"title":"predication for more mergers","user":{"login":"pratiksha","id":553500,"avatar_url":"https://avatars0.githubusercontent.com/u/553500?v=4","gravatar_id":"","url":"https://api.github.com/users/pratiksha","html_url":"https://github.com/pratiksha","followers_url":"https://api.github.com/users/pratiksha/followers","following_url":"https://api.github.com/users/pratiksha/following{/other_user}","gists_url":"https://api.github.com/users/pratiksha/gists{/gist_id}","starred_url":"https://api.github.com/users/pratiksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratiksha/subscriptions","organizations_url":"https://api.github.com/users/pratiksha/orgs","repos_url":"https://api.github.com/users/pratiksha/repos","events_url":"https://api.github.com/users/pratiksha/events{/privacy}","received_events_url":"https://api.github.com/users/pratiksha/received_events","type":"User","site_admin":false},"body":"Add predication to DictMerger and VecMerger (in addition to being useful, we'll eventually need this to implement some cost model experiments in Weld).\r\n\r\nI'm not sure about the correctness of `make_select_for_kv` in particular, so a review of that would help!","created_at":"2017-09-23T01:48:33Z","updated_at":"2017-09-29T21:35:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f365af73ad73ac0d6e0964dc071386b8f3a67d9d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"deepakn94","id":2724038,"avatar_url":"https://avatars0.githubusercontent.com/u/2724038?v=4","gravatar_id":"","url":"https://api.github.com/users/deepakn94","html_url":"https://github.com/deepakn94","followers_url":"https://api.github.com/users/deepakn94/followers","following_url":"https://api.github.com/users/deepakn94/following{/other_user}","gists_url":"https://api.github.com/users/deepakn94/gists{/gist_id}","starred_url":"https://api.github.com/users/deepakn94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepakn94/subscriptions","organizations_url":"https://api.github.com/users/deepakn94/orgs","repos_url":"https://api.github.com/users/deepakn94/repos","events_url":"https://api.github.com/users/deepakn94/events{/privacy}","received_events_url":"https://api.github.com/users/deepakn94/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/weld-project/weld/pulls/234/commits","review_comments_url":"https://api.github.com/repos/weld-project/weld/pulls/234/comments","review_comment_url":"https://api.github.com/repos/weld-project/weld/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weld-project/weld/issues/234/comments","statuses_url":"https://api.github.com/repos/weld-project/weld/statuses/4702d01877c1381ba31bd81c04ce90e3550dbf58","head":{"label":"pratiksha:complete-merge-expr","ref":"complete-merge-expr","sha":"4702d01877c1381ba31bd81c04ce90e3550dbf58","user":{"login":"pratiksha","id":553500,"avatar_url":"https://avatars0.githubusercontent.com/u/553500?v=4","gravatar_id":"","url":"https://api.github.com/users/pratiksha","html_url":"https://github.com/pratiksha","followers_url":"https://api.github.com/users/pratiksha/followers","following_url":"https://api.github.com/users/pratiksha/following{/other_user}","gists_url":"https://api.github.com/users/pratiksha/gists{/gist_id}","starred_url":"https://api.github.com/users/pratiksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratiksha/subscriptions","organizations_url":"https://api.github.com/users/pratiksha/orgs","repos_url":"https://api.github.com/users/pratiksha/repos","events_url":"https://api.github.com/users/pratiksha/events{/privacy}","received_events_url":"https://api.github.com/users/pratiksha/received_events","type":"User","site_admin":false},"repo":{"id":102075985,"name":"weld","full_name":"pratiksha/weld","owner":{"login":"pratiksha","id":553500,"avatar_url":"https://avatars0.githubusercontent.com/u/553500?v=4","gravatar_id":"","url":"https://api.github.com/users/pratiksha","html_url":"https://github.com/pratiksha","followers_url":"https://api.github.com/users/pratiksha/followers","following_url":"https://api.github.com/users/pratiksha/following{/other_user}","gists_url":"https://api.github.com/users/pratiksha/gists{/gist_id}","starred_url":"https://api.github.com/users/pratiksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratiksha/subscriptions","organizations_url":"https://api.github.com/users/pratiksha/orgs","repos_url":"https://api.github.com/users/pratiksha/repos","events_url":"https://api.github.com/users/pratiksha/events{/privacy}","received_events_url":"https://api.github.com/users/pratiksha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pratiksha/weld","description":"Weld is a runtime and language for accelerating data analytics frameworks","fork":true,"url":"https://api.github.com/repos/pratiksha/weld","forks_url":"https://api.github.com/repos/pratiksha/weld/forks","keys_url":"https://api.github.com/repos/pratiksha/weld/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pratiksha/weld/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pratiksha/weld/teams","hooks_url":"https://api.github.com/repos/pratiksha/weld/hooks","issue_events_url":"https://api.github.com/repos/pratiksha/weld/issues/events{/number}","events_url":"https://api.github.com/repos/pratiksha/weld/events","assignees_url":"https://api.github.com/repos/pratiksha/weld/assignees{/user}","branches_url":"https://api.github.com/repos/pratiksha/weld/branches{/branch}","tags_url":"https://api.github.com/repos/pratiksha/weld/tags","blobs_url":"https://api.github.com/repos/pratiksha/weld/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pratiksha/weld/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pratiksha/weld/git/refs{/sha}","trees_url":"https://api.github.com/repos/pratiksha/weld/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pratiksha/weld/statuses/{sha}","languages_url":"https://api.github.com/repos/pratiksha/weld/languages","stargazers_url":"https://api.github.com/repos/pratiksha/weld/stargazers","contributors_url":"https://api.github.com/repos/pratiksha/weld/contributors","subscribers_url":"https://api.github.com/repos/pratiksha/weld/subscribers","subscription_url":"https://api.github.com/repos/pratiksha/weld/subscription","commits_url":"https://api.github.com/repos/pratiksha/weld/commits{/sha}","git_commits_url":"https://api.github.com/repos/pratiksha/weld/git/commits{/sha}","comments_url":"https://api.github.com/repos/pratiksha/weld/comments{/number}","issue_comment_url":"https://api.github.com/repos/pratiksha/weld/issues/comments{/number}","contents_url":"https://api.github.com/repos/pratiksha/weld/contents/{+path}","compare_url":"https://api.github.com/repos/pratiksha/weld/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pratiksha/weld/merges","archive_url":"https://api.github.com/repos/pratiksha/weld/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pratiksha/weld/downloads","issues_url":"https://api.github.com/repos/pratiksha/weld/issues{/number}","pulls_url":"https://api.github.com/repos/pratiksha/weld/pulls{/number}","milestones_url":"https://api.github.com/repos/pratiksha/weld/milestones{/number}","notifications_url":"https://api.github.com/repos/pratiksha/weld/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pratiksha/weld/labels{/name}","releases_url":"https://api.github.com/repos/pratiksha/weld/releases{/id}","deployments_url":"https://api.github.com/repos/pratiksha/weld/deployments","created_at":"2017-09-01T05:11:27Z","updated_at":"2017-09-01T05:11:29Z","pushed_at":"2017-09-23T01:42:03Z","git_url":"git://github.com/pratiksha/weld.git","ssh_url":"git@github.com:pratiksha/weld.git","clone_url":"https://github.com/pratiksha/weld.git","svn_url":"https://github.com/pratiksha/weld","homepage":"weld.stanford.edu","size":1226,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"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":"weld-project:master","ref":"master","sha":"fd3eb873ac28fe1ebb6760a7147855a5c6032a8d","user":{"login":"weld-project","id":23513568,"avatar_url":"https://avatars1.githubusercontent.com/u/23513568?v=4","gravatar_id":"","url":"https://api.github.com/users/weld-project","html_url":"https://github.com/weld-project","followers_url":"https://api.github.com/users/weld-project/followers","following_url":"https://api.github.com/users/weld-project/following{/other_user}","gists_url":"https://api.github.com/users/weld-project/gists{/gist_id}","starred_url":"https://api.github.com/users/weld-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weld-project/subscriptions","organizations_url":"https://api.github.com/users/weld-project/orgs","repos_url":"https://api.github.com/users/weld-project/repos","events_url":"https://api.github.com/users/weld-project/events{/privacy}","received_events_url":"https://api.github.com/users/weld-project/received_events","type":"Organization","site_admin":false},"repo":{"id":61008232,"name":"weld","full_name":"weld-project/weld","owner":{"login":"weld-project","id":23513568,"avatar_url":"https://avatars1.githubusercontent.com/u/23513568?v=4","gravatar_id":"","url":"https://api.github.com/users/weld-project","html_url":"https://github.com/weld-project","followers_url":"https://api.github.com/users/weld-project/followers","following_url":"https://api.github.com/users/weld-project/following{/other_user}","gists_url":"https://api.github.com/users/weld-project/gists{/gist_id}","starred_url":"https://api.github.com/users/weld-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weld-project/subscriptions","organizations_url":"https://api.github.com/users/weld-project/orgs","repos_url":"https://api.github.com/users/weld-project/repos","events_url":"https://api.github.com/users/weld-project/events{/privacy}","received_events_url":"https://api.github.com/users/weld-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weld-project/weld","description":"High-performance runtime for data analytics applications","fork":false,"url":"https://api.github.com/repos/weld-project/weld","forks_url":"https://api.github.com/repos/weld-project/weld/forks","keys_url":"https://api.github.com/repos/weld-project/weld/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weld-project/weld/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weld-project/weld/teams","hooks_url":"https://api.github.com/repos/weld-project/weld/hooks","issue_events_url":"https://api.github.com/repos/weld-project/weld/issues/events{/number}","events_url":"https://api.github.com/repos/weld-project/weld/events","assignees_url":"https://api.github.com/repos/weld-project/weld/assignees{/user}","branches_url":"https://api.github.com/repos/weld-project/weld/branches{/branch}","tags_url":"https://api.github.com/repos/weld-project/weld/tags","blobs_url":"https://api.github.com/repos/weld-project/weld/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weld-project/weld/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weld-project/weld/git/refs{/sha}","trees_url":"https://api.github.com/repos/weld-project/weld/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weld-project/weld/statuses/{sha}","languages_url":"https://api.github.com/repos/weld-project/weld/languages","stargazers_url":"https://api.github.com/repos/weld-project/weld/stargazers","contributors_url":"https://api.github.com/repos/weld-project/weld/contributors","subscribers_url":"https://api.github.com/repos/weld-project/weld/subscribers","subscription_url":"https://api.github.com/repos/weld-project/weld/subscription","commits_url":"https://api.github.com/repos/weld-project/weld/commits{/sha}","git_commits_url":"https://api.github.com/repos/weld-project/weld/git/commits{/sha}","comments_url":"https://api.github.com/repos/weld-project/weld/comments{/number}","issue_comment_url":"https://api.github.com/repos/weld-project/weld/issues/comments{/number}","contents_url":"https://api.github.com/repos/weld-project/weld/contents/{+path}","compare_url":"https://api.github.com/repos/weld-project/weld/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weld-project/weld/merges","archive_url":"https://api.github.com/repos/weld-project/weld/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weld-project/weld/downloads","issues_url":"https://api.github.com/repos/weld-project/weld/issues{/number}","pulls_url":"https://api.github.com/repos/weld-project/weld/pulls{/number}","milestones_url":"https://api.github.com/repos/weld-project/weld/milestones{/number}","notifications_url":"https://api.github.com/repos/weld-project/weld/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weld-project/weld/labels{/name}","releases_url":"https://api.github.com/repos/weld-project/weld/releases{/id}","deployments_url":"https://api.github.com/repos/weld-project/weld/deployments","created_at":"2016-06-13T05:00:24Z","updated_at":"2017-09-29T02:35:12Z","pushed_at":"2017-09-28T07:28:41Z","git_url":"git://github.com/weld-project/weld.git","ssh_url":"git@github.com:weld-project/weld.git","clone_url":"https://github.com/weld-project/weld.git","svn_url":"https://github.com/weld-project/weld","homepage":"http://weld.stanford.edu","size":1288,"stargazers_count":632,"watchers_count":632,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":33,"forks":68,"open_issues":33,"watchers":632,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weld-project/weld/pulls/234"},"html":{"href":"https://github.com/weld-project/weld/pull/234"},"issue":{"href":"https://api.github.com/repos/weld-project/weld/issues/234"},"comments":{"href":"https://api.github.com/repos/weld-project/weld/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/weld-project/weld/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/weld-project/weld/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weld-project/weld/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/weld-project/weld/statuses/4702d01877c1381ba31bd81c04ce90e3550dbf58"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sppalkia"}}