Skip to content

Commit 635a3f4

Browse files
committed
Revert "add a fast path for gatherby"
This reverts commit 67de3e5.
1 parent 67de3e5 commit 635a3f4

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/other/utils.jl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -429,22 +429,7 @@ function _gather_groups(ds, cols, ::Val{T}; mapformats = false, stable = true, t
429429
colidx = index(ds)[cols]
430430
_max_level = nrow(ds)
431431

432-
# fast path for a common scenario
433-
# PooledVectors are already gathered. However, note stable must be false, since the result is not stable
434-
if (ds isa Dataset) && length(colidx) == 1 && (_columns(ds)[colidx[1]] isa PooledVector) && !stable
435-
_f = _date_value
436-
if mapformats
437-
_f = _date_valuegetformat(ds, colidx[1])
438-
end
439-
if _f == _date_valueidentity || !mapformats
440-
v = DataAPI.refarray(_columns(ds)[colidx[1]])
441-
else
442-
v = DataAPI.refarray(map(_f, _columns(ds)[colidx[1]]))
443-
end
444-
prev_groups = Vector{T}(undef, nrow(ds))
445-
copy!(prev_groups, v)
446-
return prev_groups, T[], threads ? hp_maximum(prev_groups) : stat_maximum(prev_groups)
447-
end
432+
448433
if nrow(ds) > 2^23 && !stable && 5<length(colidx)<16 # the result is stable anyway
449434
if !mapformats || all(==(identity), getformat.(Ref(ds), colidx))
450435
return _gather_groups_hugeds_multicols(ds, cols, Val(T); threads = threads)

0 commit comments

Comments
 (0)