{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/comments/221754970","pull_request_review_id":160483228,"id":221754970,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTc1NDk3MA==","diff_hunk":"@@ -22,4 +23,40 @@ d = DataFrame(n = 1:20, x = [3, 3, 3, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 3,\n g = groupby(d, :x, sort=true)\n @test @based_on(g, nsum = sum(:n))[:nsum] == [99, 84, 27]\n \n+# Transform tests\n+d = DataFrame(a = [1,1,1,2,2,3,3,1], \n+              b = Any[1,2,3,missing,missing,6.0,5.0,4], \n+              c = CategoricalArray([1,2,3,1,2,3,1,2]))\n+g = groupby(d, :a, sort = false)\n+## Scalar output \n+# Type promotion Int -> Float\n+t = @transform(g, t = :b[1])[:t] \n+correct = [1.0, 1.0, 1.0, 1.0, missing, missing, 6.0, 6.0]\n+@test all(t .=== correct) && typeof(t) == typeof(correct)","path":"test/grouping.jl","position":null,"original_position":21,"commit_id":"0db98f1b633874d3d23313736a8135ab4c3985a9","original_commit_id":"3ae01a0c7f27210e4211b692620904748028e0fb","user":{"login":"pdeffebach","id":23196228,"node_id":"MDQ6VXNlcjIzMTk2MjI4","avatar_url":"https://avatars3.githubusercontent.com/u/23196228?v=4","gravatar_id":"","url":"https://api.github.com/users/pdeffebach","html_url":"https://github.com/pdeffebach","followers_url":"https://api.github.com/users/pdeffebach/followers","following_url":"https://api.github.com/users/pdeffebach/following{/other_user}","gists_url":"https://api.github.com/users/pdeffebach/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeffebach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeffebach/subscriptions","organizations_url":"https://api.github.com/users/pdeffebach/orgs","repos_url":"https://api.github.com/users/pdeffebach/repos","events_url":"https://api.github.com/users/pdeffebach/events{/privacy}","received_events_url":"https://api.github.com/users/pdeffebach/received_events","type":"User","site_admin":false},"body":"Fixed. and the `isequal` has been changed. ","created_at":"2018-10-01T20:59:31Z","updated_at":"2018-10-01T20:59:31Z","html_url":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101#discussion_r221754970","pull_request_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/comments/221754970"},"html":{"href":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101#discussion_r221754970"},"pull_request":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101"}},"in_reply_to_id":221705605},"pull_request":{"url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101","id":205890777,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1ODkwNzc3","html_url":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101","diff_url":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101.diff","patch_url":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101.patch","issue_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/101","number":101,"state":"open","locked":false,"title":"Change the way grouped transforms work","user":{"login":"pdeffebach","id":23196228,"node_id":"MDQ6VXNlcjIzMTk2MjI4","avatar_url":"https://avatars3.githubusercontent.com/u/23196228?v=4","gravatar_id":"","url":"https://api.github.com/users/pdeffebach","html_url":"https://github.com/pdeffebach","followers_url":"https://api.github.com/users/pdeffebach/followers","following_url":"https://api.github.com/users/pdeffebach/following{/other_user}","gists_url":"https://api.github.com/users/pdeffebach/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeffebach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeffebach/subscriptions","organizations_url":"https://api.github.com/users/pdeffebach/orgs","repos_url":"https://api.github.com/users/pdeffebach/repos","events_url":"https://api.github.com/users/pdeffebach/events{/privacy}","received_events_url":"https://api.github.com/users/pdeffebach/received_events","type":"User","site_admin":false},"body":"With this PR, now we allocate a vector using `reduce(v ...generator for all operations on groups...)` \r\n\r\nhowever I still have an error with type promotions. Consider the following example:\r\n\r\n```\r\n df = DataFrame(a = [1,2,3, missing, missing], b = [1,1,1,2,2])\r\ng = groupby(df, :b)\r\n @transform(g, x = mean(:a))\r\n```\r\n\r\nIt seems like `reduce(append!, t(ig) for ig in g` should automatically promote types, but it doesn't. \r\n","created_at":"2018-08-02T23:45:38Z","updated_at":"2018-10-01T20:59:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39c8b0a2d96368f614c6d272d00dcfb06a848224","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101/commits","review_comments_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101/comments","review_comment_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/101/comments","statuses_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/statuses/0db98f1b633874d3d23313736a8135ab4c3985a9","head":{"label":"pdeffebach:group-transform-overhaul","ref":"group-transform-overhaul","sha":"0db98f1b633874d3d23313736a8135ab4c3985a9","user":{"login":"pdeffebach","id":23196228,"node_id":"MDQ6VXNlcjIzMTk2MjI4","avatar_url":"https://avatars3.githubusercontent.com/u/23196228?v=4","gravatar_id":"","url":"https://api.github.com/users/pdeffebach","html_url":"https://github.com/pdeffebach","followers_url":"https://api.github.com/users/pdeffebach/followers","following_url":"https://api.github.com/users/pdeffebach/following{/other_user}","gists_url":"https://api.github.com/users/pdeffebach/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeffebach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeffebach/subscriptions","organizations_url":"https://api.github.com/users/pdeffebach/orgs","repos_url":"https://api.github.com/users/pdeffebach/repos","events_url":"https://api.github.com/users/pdeffebach/events{/privacy}","received_events_url":"https://api.github.com/users/pdeffebach/received_events","type":"User","site_admin":false},"repo":{"id":131370015,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEzNzAwMTU=","name":"DataFramesMeta.jl","full_name":"pdeffebach/DataFramesMeta.jl","private":false,"owner":{"login":"pdeffebach","id":23196228,"node_id":"MDQ6VXNlcjIzMTk2MjI4","avatar_url":"https://avatars3.githubusercontent.com/u/23196228?v=4","gravatar_id":"","url":"https://api.github.com/users/pdeffebach","html_url":"https://github.com/pdeffebach","followers_url":"https://api.github.com/users/pdeffebach/followers","following_url":"https://api.github.com/users/pdeffebach/following{/other_user}","gists_url":"https://api.github.com/users/pdeffebach/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeffebach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeffebach/subscriptions","organizations_url":"https://api.github.com/users/pdeffebach/orgs","repos_url":"https://api.github.com/users/pdeffebach/repos","events_url":"https://api.github.com/users/pdeffebach/events{/privacy}","received_events_url":"https://api.github.com/users/pdeffebach/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pdeffebach/DataFramesMeta.jl","description":"Metaprogramming tools for DataFrames ","fork":true,"url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl","forks_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/forks","keys_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/teams","hooks_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/hooks","issue_events_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/issues/events{/number}","events_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/events","assignees_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/assignees{/user}","branches_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/branches{/branch}","tags_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/tags","blobs_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/languages","stargazers_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/stargazers","contributors_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/contributors","subscribers_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/subscribers","subscription_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/subscription","commits_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/contents/{+path}","compare_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/merges","archive_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/downloads","issues_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/issues{/number}","pulls_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/labels{/name}","releases_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/releases{/id}","deployments_url":"https://api.github.com/repos/pdeffebach/DataFramesMeta.jl/deployments","created_at":"2018-04-28T03:44:18Z","updated_at":"2018-08-02T16:12:19Z","pushed_at":"2018-10-01T20:21:26Z","git_url":"git://github.com/pdeffebach/DataFramesMeta.jl.git","ssh_url":"git@github.com:pdeffebach/DataFramesMeta.jl.git","clone_url":"https://github.com/pdeffebach/DataFramesMeta.jl.git","svn_url":"https://github.com/pdeffebach/DataFramesMeta.jl","homepage":null,"size":155,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaStats:master","ref":"master","sha":"07325ebd1e100945ae217af70529521d37ecb3af","user":{"login":"JuliaStats","id":2761531,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjE1MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/2761531?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaStats","html_url":"https://github.com/JuliaStats","followers_url":"https://api.github.com/users/JuliaStats/followers","following_url":"https://api.github.com/users/JuliaStats/following{/other_user}","gists_url":"https://api.github.com/users/JuliaStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaStats/subscriptions","organizations_url":"https://api.github.com/users/JuliaStats/orgs","repos_url":"https://api.github.com/users/JuliaStats/repos","events_url":"https://api.github.com/users/JuliaStats/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaStats/received_events","type":"Organization","site_admin":false},"repo":{"id":16530347,"node_id":"MDEwOlJlcG9zaXRvcnkxNjUzMDM0Nw==","name":"DataFramesMeta.jl","full_name":"JuliaStats/DataFramesMeta.jl","private":false,"owner":{"login":"JuliaStats","id":2761531,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjE1MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/2761531?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaStats","html_url":"https://github.com/JuliaStats","followers_url":"https://api.github.com/users/JuliaStats/followers","following_url":"https://api.github.com/users/JuliaStats/following{/other_user}","gists_url":"https://api.github.com/users/JuliaStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaStats/subscriptions","organizations_url":"https://api.github.com/users/JuliaStats/orgs","repos_url":"https://api.github.com/users/JuliaStats/repos","events_url":"https://api.github.com/users/JuliaStats/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaStats/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaStats/DataFramesMeta.jl","description":"Metaprogramming tools for DataFrames ","fork":false,"url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl","forks_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/forks","keys_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/teams","hooks_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/events","assignees_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/tags","blobs_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/subscription","commits_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/merges","archive_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/downloads","issues_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/deployments","created_at":"2014-02-05T00:16:36Z","updated_at":"2018-09-24T21:27:53Z","pushed_at":"2018-10-01T20:21:28Z","git_url":"git://github.com/JuliaStats/DataFramesMeta.jl.git","ssh_url":"git@github.com:JuliaStats/DataFramesMeta.jl.git","clone_url":"https://github.com/JuliaStats/DataFramesMeta.jl.git","svn_url":"https://github.com/JuliaStats/DataFramesMeta.jl","homepage":null,"size":141,"stargazers_count":123,"watchers_count":123,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":23,"open_issues":17,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101"},"html":{"href":"https://github.com/JuliaStats/DataFramesMeta.jl/pull/101"},"issue":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/101"},"comments":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaStats/DataFramesMeta.jl/statuses/0db98f1b633874d3d23313736a8135ab4c3985a9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pdeffebach"}}