{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/comments/159052363","pull_request_review_id":85943739,"id":159052363,"diff_hunk":"@@ -108,19 +108,49 @@ function Base.insert!(x::Index, idx::Integer, nm::Symbol)\n     x\n end\n \n-Base.getindex(x::Index, idx::Symbol) = x.lookup[idx]\n-Base.getindex(x::AbstractIndex, idx::Real) = Int(idx)\n-Base.getindex(x::AbstractIndex, idx::AbstractVector{Union{Bool, Missing}}) =\n-    getindex(x, collect(Missings.replace(idx, false)))\n+Base.getindex(x::AbstractIndex, idx::Symbol) = x.lookup[idx]\n+Base.getindex(x::AbstractIndex, idx::AbstractVector{Symbol}) = [x.lookup[i] for i in idx]\n+\n+function Base.getindex(x::AbstractIndex, idx::Real)\n+    idx isa Bool && Base.depwarn(\"Indexing with Bool values is deprecated\", :getindex)\n+    idx isa Integer || Base.depwarn(\"Indexing with values that are not Integer is deprecated\", :getindex)\n+    Int(idx)\n+end\n+\n+function Base.getindex(x::AbstractIndex, idx::AbstractVector{<:Real})\n+    any(v -> v isa Bool, idx) && Base.depwarn(\"Indexing with Bool values is deprecated\")\n+    all(v -> v isa Integer, idx) || Base.depwarn(\"Indexing with values that are not Integer is deprecated\", :getindex)\n+    Vector{Int}(idx)\n+end\n+\n function Base.getindex(x::AbstractIndex, idx::AbstractVector{Bool})\n     length(x) == length(idx) || throw(BoundsError(x, idx))\n     find(idx)\n end\n-Base.getindex(x::AbstractIndex, idx::AbstractVector{T}) where {T >: Missing} =\n-    getindex(x, collect(skipmissing(idx)))\n-Base.getindex(x::AbstractIndex, idx::AbstractRange) = [idx;]\n-Base.getindex(x::AbstractIndex, idx::AbstractVector{T}) where {T <: Real} = convert(Vector{Int}, idx)\n-Base.getindex(x::AbstractIndex, idx::AbstractVector{Symbol}) = [x.lookup[i] for i in idx]\n+\n+Base.getindex(x::AbstractIndex, idx::AbstractRange) = getindex(x, collect(idx))","path":"src/other/index.jl","position":null,"original_position":33,"commit_id":"c18473ebdebdc312cceaf20fe7ca9b0f7edb2dfb","original_commit_id":"c4de620b017ca2fd1918af282ff16173782a5aa4","user":{"login":"nalimilan","id":1120448,"avatar_url":"https://avatars3.githubusercontent.com/u/1120448?v=4","gravatar_id":"","url":"https://api.github.com/users/nalimilan","html_url":"https://github.com/nalimilan","followers_url":"https://api.github.com/users/nalimilan/followers","following_url":"https://api.github.com/users/nalimilan/following{/other_user}","gists_url":"https://api.github.com/users/nalimilan/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimilan/subscriptions","organizations_url":"https://api.github.com/users/nalimilan/orgs","repos_url":"https://api.github.com/users/nalimilan/repos","events_url":"https://api.github.com/users/nalimilan/events{/privacy}","received_events_url":"https://api.github.com/users/nalimilan/received_events","type":"User","site_admin":false},"body":"In general better require just `::AbstractVector{Integer}`, yes.","created_at":"2017-12-29T11:35:52Z","updated_at":"2017-12-29T11:35:52Z","html_url":"https://github.com/JuliaData/DataFrames.jl/pull/1305#discussion_r159052363","pull_request_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/comments/159052363"},"html":{"href":"https://github.com/JuliaData/DataFrames.jl/pull/1305#discussion_r159052363"},"pull_request":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305"}},"in_reply_to_id":158732610},"pull_request":{"url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305","id":156069207,"html_url":"https://github.com/JuliaData/DataFrames.jl/pull/1305","diff_url":"https://github.com/JuliaData/DataFrames.jl/pull/1305.diff","patch_url":"https://github.com/JuliaData/DataFrames.jl/pull/1305.patch","issue_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/1305","number":1305,"state":"open","locked":false,"title":"Redesign getindex and fix stack/melt StackOverflow error","user":{"login":"bkamins","id":6187170,"avatar_url":"https://avatars3.githubusercontent.com/u/6187170?v=4","gravatar_id":"","url":"https://api.github.com/users/bkamins","html_url":"https://github.com/bkamins","followers_url":"https://api.github.com/users/bkamins/followers","following_url":"https://api.github.com/users/bkamins/following{/other_user}","gists_url":"https://api.github.com/users/bkamins/gists{/gist_id}","starred_url":"https://api.github.com/users/bkamins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkamins/subscriptions","organizations_url":"https://api.github.com/users/bkamins/orgs","repos_url":"https://api.github.com/users/bkamins/repos","events_url":"https://api.github.com/users/bkamins/events{/privacy}","received_events_url":"https://api.github.com/users/bkamins/received_events","type":"User","site_admin":false},"body":"Currently `stack(df, :a, [])` produces StackOverflow.\r\nWith this PR we check that length of `measure_vars` and `id_vars` is at least 1.","created_at":"2017-12-03T16:54:58Z","updated_at":"2017-12-29T11:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fc4eb1396dca476e68782c8b7f662cf20f9254f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305/commits","review_comments_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305/comments","review_comment_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/1305/comments","statuses_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/statuses/c18473ebdebdc312cceaf20fe7ca9b0f7edb2dfb","head":{"label":"bkamins:fix_reshaping","ref":"fix_reshaping","sha":"c18473ebdebdc312cceaf20fe7ca9b0f7edb2dfb","user":{"login":"bkamins","id":6187170,"avatar_url":"https://avatars3.githubusercontent.com/u/6187170?v=4","gravatar_id":"","url":"https://api.github.com/users/bkamins","html_url":"https://github.com/bkamins","followers_url":"https://api.github.com/users/bkamins/followers","following_url":"https://api.github.com/users/bkamins/following{/other_user}","gists_url":"https://api.github.com/users/bkamins/gists{/gist_id}","starred_url":"https://api.github.com/users/bkamins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkamins/subscriptions","organizations_url":"https://api.github.com/users/bkamins/orgs","repos_url":"https://api.github.com/users/bkamins/repos","events_url":"https://api.github.com/users/bkamins/events{/privacy}","received_events_url":"https://api.github.com/users/bkamins/received_events","type":"User","site_admin":false},"repo":{"id":112845765,"name":"DataFrames.jl","full_name":"bkamins/DataFrames.jl","owner":{"login":"bkamins","id":6187170,"avatar_url":"https://avatars3.githubusercontent.com/u/6187170?v=4","gravatar_id":"","url":"https://api.github.com/users/bkamins","html_url":"https://github.com/bkamins","followers_url":"https://api.github.com/users/bkamins/followers","following_url":"https://api.github.com/users/bkamins/following{/other_user}","gists_url":"https://api.github.com/users/bkamins/gists{/gist_id}","starred_url":"https://api.github.com/users/bkamins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkamins/subscriptions","organizations_url":"https://api.github.com/users/bkamins/orgs","repos_url":"https://api.github.com/users/bkamins/repos","events_url":"https://api.github.com/users/bkamins/events{/privacy}","received_events_url":"https://api.github.com/users/bkamins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bkamins/DataFrames.jl","description":"Library for working with tabular data in Julia","fork":true,"url":"https://api.github.com/repos/bkamins/DataFrames.jl","forks_url":"https://api.github.com/repos/bkamins/DataFrames.jl/forks","keys_url":"https://api.github.com/repos/bkamins/DataFrames.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bkamins/DataFrames.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bkamins/DataFrames.jl/teams","hooks_url":"https://api.github.com/repos/bkamins/DataFrames.jl/hooks","issue_events_url":"https://api.github.com/repos/bkamins/DataFrames.jl/issues/events{/number}","events_url":"https://api.github.com/repos/bkamins/DataFrames.jl/events","assignees_url":"https://api.github.com/repos/bkamins/DataFrames.jl/assignees{/user}","branches_url":"https://api.github.com/repos/bkamins/DataFrames.jl/branches{/branch}","tags_url":"https://api.github.com/repos/bkamins/DataFrames.jl/tags","blobs_url":"https://api.github.com/repos/bkamins/DataFrames.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bkamins/DataFrames.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bkamins/DataFrames.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/bkamins/DataFrames.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bkamins/DataFrames.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/bkamins/DataFrames.jl/languages","stargazers_url":"https://api.github.com/repos/bkamins/DataFrames.jl/stargazers","contributors_url":"https://api.github.com/repos/bkamins/DataFrames.jl/contributors","subscribers_url":"https://api.github.com/repos/bkamins/DataFrames.jl/subscribers","subscription_url":"https://api.github.com/repos/bkamins/DataFrames.jl/subscription","commits_url":"https://api.github.com/repos/bkamins/DataFrames.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/bkamins/DataFrames.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/bkamins/DataFrames.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/bkamins/DataFrames.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/bkamins/DataFrames.jl/contents/{+path}","compare_url":"https://api.github.com/repos/bkamins/DataFrames.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bkamins/DataFrames.jl/merges","archive_url":"https://api.github.com/repos/bkamins/DataFrames.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bkamins/DataFrames.jl/downloads","issues_url":"https://api.github.com/repos/bkamins/DataFrames.jl/issues{/number}","pulls_url":"https://api.github.com/repos/bkamins/DataFrames.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/bkamins/DataFrames.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/bkamins/DataFrames.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bkamins/DataFrames.jl/labels{/name}","releases_url":"https://api.github.com/repos/bkamins/DataFrames.jl/releases{/id}","deployments_url":"https://api.github.com/repos/bkamins/DataFrames.jl/deployments","created_at":"2017-12-02T13:50:44Z","updated_at":"2017-12-02T13:50:46Z","pushed_at":"2017-12-29T11:33:57Z","git_url":"git://github.com/bkamins/DataFrames.jl.git","ssh_url":"git@github.com:bkamins/DataFrames.jl.git","clone_url":"https://github.com/bkamins/DataFrames.jl.git","svn_url":"https://github.com/bkamins/DataFrames.jl","homepage":"","size":9124,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaData:master","ref":"master","sha":"f24817da5fa7b62aa7836b8ae839e7244449d7be","user":{"login":"JuliaData","id":20142970,"avatar_url":"https://avatars3.githubusercontent.com/u/20142970?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaData","html_url":"https://github.com/JuliaData","followers_url":"https://api.github.com/users/JuliaData/followers","following_url":"https://api.github.com/users/JuliaData/following{/other_user}","gists_url":"https://api.github.com/users/JuliaData/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaData/subscriptions","organizations_url":"https://api.github.com/users/JuliaData/orgs","repos_url":"https://api.github.com/users/JuliaData/repos","events_url":"https://api.github.com/users/JuliaData/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaData/received_events","type":"Organization","site_admin":false},"repo":{"id":4992873,"name":"DataFrames.jl","full_name":"JuliaData/DataFrames.jl","owner":{"login":"JuliaData","id":20142970,"avatar_url":"https://avatars3.githubusercontent.com/u/20142970?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaData","html_url":"https://github.com/JuliaData","followers_url":"https://api.github.com/users/JuliaData/followers","following_url":"https://api.github.com/users/JuliaData/following{/other_user}","gists_url":"https://api.github.com/users/JuliaData/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaData/subscriptions","organizations_url":"https://api.github.com/users/JuliaData/orgs","repos_url":"https://api.github.com/users/JuliaData/repos","events_url":"https://api.github.com/users/JuliaData/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaData/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaData/DataFrames.jl","description":"Library for working with tabular data in Julia","fork":false,"url":"https://api.github.com/repos/JuliaData/DataFrames.jl","forks_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/forks","keys_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/teams","hooks_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/events","assignees_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/tags","blobs_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/subscription","commits_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/merges","archive_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/downloads","issues_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaData/DataFrames.jl/deployments","created_at":"2012-07-11T18:00:09Z","updated_at":"2017-12-27T03:39:23Z","pushed_at":"2017-12-29T11:33:59Z","git_url":"git://github.com/JuliaData/DataFrames.jl.git","ssh_url":"git@github.com:JuliaData/DataFrames.jl.git","clone_url":"https://github.com/JuliaData/DataFrames.jl.git","svn_url":"https://github.com/JuliaData/DataFrames.jl","homepage":"","size":9096,"stargazers_count":429,"watchers_count":429,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":190,"mirror_url":null,"archived":false,"open_issues_count":71,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":190,"open_issues":71,"watchers":429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305"},"html":{"href":"https://github.com/JuliaData/DataFrames.jl/pull/1305"},"issue":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/1305"},"comments":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/issues/1305/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/pulls/1305/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaData/DataFrames.jl/statuses/c18473ebdebdc312cceaf20fe7ca9b0f7edb2dfb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nalimilan"}}