From a391912e26cd6b0df9aa991cb210c5a0a6f2a09a Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Mon, 24 Aug 2020 16:58:13 -0600 Subject: [PATCH] Don't match on AbstractVector type parameter due to compiler crash (#2383) --- Project.toml | 2 +- src/groupeddataframe/splitapplycombine.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index d3bee6ff1e..4d8bc8321c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DataFrames" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "0.21.6" +version = "0.21.7" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" diff --git a/src/groupeddataframe/splitapplycombine.jl b/src/groupeddataframe/splitapplycombine.jl index 078b61320f..9ee7c22247 100644 --- a/src/groupeddataframe/splitapplycombine.jl +++ b/src/groupeddataframe/splitapplycombine.jl @@ -969,7 +969,7 @@ function copyto_widen!(res::AbstractVector{T}, x::AbstractVector) where T end function groupreduce!(res::AbstractVector, f, op, condf, adjust, checkempty::Bool, - incol::AbstractVector{T}, gd::GroupedDataFrame) where {T} + incol::AbstractVector, gd::GroupedDataFrame) n = length(gd) if adjust !== nothing || checkempty counts = zeros(Int, n) @@ -1001,7 +1001,7 @@ function groupreduce!(res::AbstractVector, f, op, condf, adjust, checkempty::Boo end @inbounds for gix in eachindex(res) if !isassigned(res, gix) - res[gix] = initf(nonmissingtype(T)) + res[gix] = initf(nonmissingtype(eltype(incol))) end end end