diff --git a/test/grouping.jl b/test/grouping.jl index cafb5d7e08..f219451618 100644 --- a/test/grouping.jl +++ b/test/grouping.jl @@ -3173,4 +3173,18 @@ end :min => min.(df.y, df.z), :max => max.(df.y, df.z), :y => df.y) |> sort end +@testset "hashing of pooled vectors" begin + for x in ([1:900; fill(1, 101)], [1:902; fill(1, 99)], + [1:900; fill(missing, 101)], [1:902; fill(missing, 99)]) + x1 = PooledArray(x); + x2 = categorical(x); + @test DataFrames.hashrows((x,), false) == + DataFrames.hashrows((x1,), false) == + DataFrames.hashrows((x2,), false) + @test DataFrames.hashrows((x,), true) == + DataFrames.hashrows((x1,), true) == + DataFrames.hashrows((x2,), true) + end +end + end # module