Skip to content

Commit

Permalink
Fix bug in groupby
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Sep 11, 2017
1 parent a81c5e3 commit 9cd0b0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/enumerable/enumerable_groupby.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function start{T,TKey,TS,SO,ES}(iter::EnumerableGroupBySimple{T,TKey,TS,SO,ES})
for i in iter.source
key = iter.elementSelector(i)
if !haskey(result, key)
result[key] = Grouping(key,Array{TS}(0))
result[key] = T(key,Array{TS}(0))
end
push!(result[key].elements,i)
end
Expand Down Expand Up @@ -89,7 +89,7 @@ function start{T,TKey,TR,SO,ES}(iter::EnumerableGroupBy{T,TKey,TR,SO,ES})
for i in iter.source
key = iter.elementSelector(i)
if !haskey(result, key)
result[key] = Grouping(key,Array{TR}(0))
result[key] = T(key,Array{TR}(0))
end
push!(result[key].elements,iter.resultSelector(i))
end
Expand Down

0 comments on commit 9cd0b0d

Please sign in to comment.