in src/arraytypes/views.jl [41:76]
@propagate_inbounds function Base.getindex(l::View{T}, i::Integer) where {T}
@boundscheck checkbounds(l, i)
@inbounds v = l.data[i]
S = Base.nonmissingtype(T)
if S <: Base.CodeUnits
return !l.validity[i] ? missing :
v.length < 13 ?
Base.CodeUnits(
StringView(
@view l.inline[(((i - 1) * 16) + 5):(((i - 1) * 16) + 5 + v.length - 1)]
),
) :
Base.CodeUnits(
StringView(
@view l.buffers[v.bufindex + 1][(v.offset + 1):(v.offset + v.length)]
),
)
else
return !l.validity[i] ? missing :
v.length < 13 ?
ArrowTypes.fromarrow(
T,
StringView(
@view l.inline[(((i - 1) * 16) + 5):(((i - 1) * 16) + 5 + v.length - 1)]
),
) :
ArrowTypes.fromarrow(
T,
StringView(
@view l.buffers[v.bufindex + 1][(v.offset + 1):(v.offset + v.length)]
),
)
end
end