Skip to content

Commit ac199b0

Browse files
Bugfix type instability in length(::Arrow.ToList) (#497)
Co-authored-by: Ben Baumgold <[email protected]>
1 parent 3712291 commit ac199b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
name = "Arrow"
1818
uuid = "69666777-d1a9-59fb-9406-91d4454c9d45"
1919
authors = ["quinnj <[email protected]>"]
20-
version = "2.7.0"
20+
version = "2.7.1"
2121

2222
[deps]
2323
ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"

src/arraytypes/list.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function ToList(input; largelists::Bool=false)
130130
end
131131

132132
Base.IndexStyle(::Type{<:ToList}) = Base.IndexLinear()
133-
Base.size(x::ToList) = (length(x.inds) == 0 ? 0 : x.inds[end],)
133+
Base.size(x::ToList{T,S,A,I}) where {T,S,A,I} = (isempty(x.inds) ? zero(I) : x.inds[end],)
134134

135135
function Base.pointer(A::ToList{UInt8}, i::Integer)
136136
chunk = searchsortedfirst(A.inds, i)

0 commit comments

Comments
 (0)