Skip to content

Nullable fields don't always need Union{Missing, T} #384

@evetion

Description

@evetion

I'm trying to implement the GeoArrow spec, which gives back coordinates in a deeply nested list of a FixedList (a point). Because these lists are theoretically nullable, in Julia we get an deeply nested list with Unions of Missing, even though these vectors contain no missings. An example for a column of LineStrings (there are geometry types that require two more levels of nesting):

2-element Arrow.List{Vector{Union{Missing, Vector{Union{Missing, Tuple{Float64, Float64}}}}}

It's pretty hard to convert these elements to a concrete Vector{Vector{NTuple, Float64}} without allocating. Is there a way to edit the view to be non missing? An alternative way would be to pass all(validitybitmap) in build to juliaeltype, so we only set Missing when there are actual missing values.

I'm happy to make a PR if there's consensus on what to do.

Might be related to #373.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions