Skip to content

Commit 0f326da

Browse files
author
msl
committed
this fixes bugs in 1.12
1 parent 95b1c01 commit 0f326da

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

src/InMemoryDatasets.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ export
120120
update!
121121

122122

123-
123+
SMALLSIGNED = Union{Int16, Int32, Int8}
124+
SMALLUNSIGNED = Union{UInt16, UInt32, UInt8}
124125

125126

126127
include("other/index.jl")

src/byrow/row_functions.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function row_sum(ds::AbstractDataset, f::Function, cols = names(ds, Union{Missi
3434
CT = mapreduce(eltype, promote_type, view(_columns(ds),colsidx))
3535
T = Core.Compiler.return_type(f, Tuple{CT})
3636
CT = our_nonmissingtype(T)
37-
CT <: Base.SmallSigned ? CT = Int : nothing
38-
CT <: Base.SmallUnsigned ? CT = UInt : nothing
37+
CT <: SMALLSIGNED ? CT = Int : nothing
38+
CT <: SMALLUNSIGNED ? CT = UInt : nothing
3939
CT <: Bool ? CT = Int : nothing
4040
T = Union{Missing, CT}
4141
init0 = _missings(T, nrow(ds))
@@ -69,8 +69,8 @@ function row_prod(ds::AbstractDataset, f::Function, cols = names(ds, Union{Missi
6969
CT = mapreduce(eltype, promote_type, view(_columns(ds),colsidx))
7070
T = Core.Compiler.return_type(f, Tuple{CT})
7171
CT = our_nonmissingtype(T)
72-
CT <: Base.SmallSigned ? CT = Int : nothing
73-
CT <: Base.SmallUnsigned ? CT = UInt : nothing
72+
CT <: SMALLSIGNED ? CT = Int : nothing
73+
CT <: SMALLUNSIGNED ? CT = UInt : nothing
7474
CT <: Bool ? CT = Int : nothing
7575
T = Union{Missing, CT}
7676
init0 = _missings(T, nrow(ds))
@@ -744,9 +744,9 @@ function row_cumsum!(ds::Dataset, cols = names(ds, Union{Missing, Number}); miss
744744
colsidx = index(ds)[cols]
745745
T = mapreduce(eltype, promote_type, view(_columns(ds),colsidx))
746746
if T <: Union{Missing, INTEGERS}
747-
T <: Union{Missing, Base.SmallSigned}
748-
T = T <: Union{Missing, Base.SmallSigned, Bool} ? Union{Int, Missing} : T
749-
T = T <: Union{Missing, Base.SmallUnsigned} ? Union{Missing, UInt} : T
747+
T <: Union{Missing, SMALLSIGNED}
748+
T = T <: Union{Missing, SMALLSIGNED, Bool} ? Union{Int, Missing} : T
749+
T = T <: Union{Missing, SMALLUNSIGNED} ? Union{Missing, UInt} : T
750750
end
751751
for i in colsidx
752752
if eltype(ds[!, i]) >: Missing

src/sort/gatherby.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ end
248248
function gatherby_mapreduce(gds::GatherBy, f, op, col::ColumnIndex, nt, init, ::Val{T}; promotetypes = false, threads = true) where T
249249
CT = T
250250
if promotetypes
251-
T <: Base.SmallSigned ? CT = Int : nothing
252-
T <: Base.SmallUnsigned ? CT = UInt : nothing
251+
T <: SMALLSIGNED ? CT = Int : nothing
252+
T <: SMALLUNSIGNED ? CT = UInt : nothing
253253
end
254254
res = allocatecol(Union{CT, Missing}, gds.lastvalid)
255255
fill!(res, init)

src/stat/hp_stat.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function hp_sum(f, x::AbstractVector{T}) where {T}
4242
cz = div(n, nt)
4343
cz == 0 && return stat_sum(f, x)
4444
CT = Core.Compiler.return_type(f, Tuple{our_nonmissingtype(eltype(x))})
45-
CT <: Base.SmallSigned ? CT = Int : nothing
46-
CT <: Base.SmallUnsigned ? CT = UInt : nothing
45+
CT <: SMALLSIGNED ? CT = Int : nothing
46+
CT <: SMALLUNSIGNED ? CT = UInt : nothing
4747
CT <: Bool ? CT = Int : nothing
4848
if T >: Missing
4949
CT = Union{Missing,CT}

0 commit comments

Comments
 (0)