This is an automated email from the ASF dual-hosted git repository.
baumgold pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-julia.git
The following commit(s) were added to refs/heads/main by this push:
new ac199b0 Bugfix type instability in length(::Arrow.ToList) (#497)
ac199b0 is described below
commit ac199b0e377502ea0f1fa5ced7fda897a01b82a9
Author: Joao Aparicio <[email protected]>
AuthorDate: Tue Jan 30 11:37:51 2024 -0600
Bugfix type instability in length(::Arrow.ToList) (#497)
Co-authored-by: Ben Baumgold <[email protected]>
---
Project.toml | 2 +-
src/arraytypes/list.jl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Project.toml b/Project.toml
index 1e3ffe3..b283dc9 100644
--- a/Project.toml
+++ b/Project.toml
@@ -17,7 +17,7 @@
name = "Arrow"
uuid = "69666777-d1a9-59fb-9406-91d4454c9d45"
authors = ["quinnj <[email protected]>"]
-version = "2.7.0"
+version = "2.7.1"
[deps]
ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"
diff --git a/src/arraytypes/list.jl b/src/arraytypes/list.jl
index 8e2a1af..41ac66f 100644
--- a/src/arraytypes/list.jl
+++ b/src/arraytypes/list.jl
@@ -130,7 +130,7 @@ function ToList(input; largelists::Bool=false)
end
Base.IndexStyle(::Type{<:ToList}) = Base.IndexLinear()
-Base.size(x::ToList) = (length(x.inds) == 0 ? 0 : x.inds[end],)
+Base.size(x::ToList{T,S,A,I}) where {T,S,A,I} = (isempty(x.inds) ? zero(I) :
x.inds[end],)
function Base.pointer(A::ToList{UInt8}, i::Integer)
chunk = searchsortedfirst(A.inds, i)