Skip to content

Commit

Permalink
fix tests on nightly and 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins committed Sep 7, 2024
1 parent 1761261 commit 72c90a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/groupeddataframe/complextransforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,12 @@ function _combine_rows_with_first!((firstrow,)::Ref{Any},
# Create up to one task per thread
# This has lower overhead than creating one task per group,
# but is optimal only if operations take roughly the same time for all groups
basesize = max(1, cld(len - 1, Threads.nthreads()))
partitions = Iterators.partition(2:len, basesize)
if isthreadsafe(outcols, incols)
basesize = max(1, cld(len - 1, Threads.nthreads()))
partitions = Iterators.partition(2:len, basesize)
else
partitions = (2:len,)
end
widen_type_lock = ReentrantLock()
outcolsref = Ref{NTuple{<:Any, AbstractVector}}(outcols)
type_widened = fill(false, length(partitions))
Expand Down
4 changes: 2 additions & 2 deletions test/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ end
df = DataFrame(
A=Int64[1,4,9,16,25,36,49,64],
B = [
md"[DataFrames.jl](http://juliadata.github.io/DataFrames.jl)",
md"ABC",
md"``\frac{x^2}{x^2+y^2}``",
md"`Header`",
md"This is *very*, **very**, very, very, very, very, very, very, very long line" ,
Expand All @@ -781,7 +781,7 @@ end
Row │ A B
│ Int64 MD
─────┼──────────────────────────────────────────
1 │ 1 DataFrames.jl (http://juliadat…
1 │ 1 ABC
2 │ 4 \\frac{x^2}{x^2+y^2}
3 │ 9 Header
4 │ 16 This is very, very, very, very…
Expand Down
2 changes: 1 addition & 1 deletion test/select.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3039,7 +3039,7 @@ end
@test size(combine(df, :a => (x -> Any[]) => AsTable)) == (0, 0)
df2 = combine(df, :a => (x -> NamedTuple{(:x,),Tuple{Int64}}[]) => AsTable)
@test size(df2) == (0, 1)
@test eltype(df2.x) === Int
@test eltype(df2.x) === Int64
end

end # module

0 comments on commit 72c90a7

Please sign in to comment.