Skip to content

Commit d27bc69

Browse files
committed
avoid defining a one arg hash since it has some invalidation issues
1 parent 567013c commit d27bc69

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/join/core.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ Base.IndexStyle(::Type{<:OnCol}) = Base.IndexLinear()
3333
return OnColRow(i, oc.cols, oc.h)
3434
end
3535

36-
Base.hash(ocr1::OnColRow, h::UInt) = throw(MethodError(hash, (ocr1, h)))
37-
@inline Base.hash(ocr1::OnColRow) = @inbounds ocr1.h[ocr1.row]
36+
@inline Base.hash(ocr1::OnColRow, h::UInt) = @inbounds ocr1.h[ocr1.row] h
3837

3938
# Hashing one column at a time is faster since it can use SIMD
4039
function _prehash(oc::OnCol)

test/join.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,6 @@ end
10001000
end
10011001

10021002
for i in eachindex(c1), j in eachindex(oncols, tupcols)
1003-
@test_throws MethodError hash(oncols[j][1], zero(UInt))
10041003
DataFrames._prehash(oncols[j])
10051004
@test hash(oncols[j][i]) == hash(tupcols[j][i])
10061005
for k in eachindex(c1)

0 commit comments

Comments
 (0)