# Concise encoding of \`nothing\` in Arrow.jl

**URL:** https://discourse.julialang.org/t/concise-encoding-of-nothing-in-arrow-jl/136348
**Category:** General Usage
**Created:** [March 23, 2026, 7:57pm UTC](https://discourse.julialang.org/t/concise-encoding-of-nothing-in-arrow-jl/136348 "2026-03-23T19:57:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [March 23, 2026, 7:57pm UTC](https://discourse.julialang.org/t/concise-encoding-of-nothing-in-arrow-jl/136348/1 "2026-03-23T19:57:58Z")

</div>

Arrow.jl encodes `Union{Missing, T}` concisely, but `Union{Nothing, T}` takes more space.

```julia-auto
using Arrow

for (label, col) in [
    "Union{Missing,String}" => Union{Missing,String}["a", missing, "b"],
    "Union{Nothing,String}" => Union{Nothing,String}["a", nothing, "b"],
]
    Arrow.write("/tmp/t.arrow", (; x = col))
    t = Arrow.Table("/tmp/t.arrow")
    println("$label => eltype=$(eltype(t.x)), $(filesize("/tmp/t.arrow")) bytes")
end

```

```julia-auto
% jl /tmp/arrow_nulls.jl                             
Union{Missing,String} => eltype=Union{Missing, String}, 474 bytes
Union{Nothing,String} => eltype=Union{Missing, Nothing, String}, 1082 bytes

```

- At the moment we get a 3-way `Union{Missing, Nothing, String}` even though no `missing` value is present. Is that intended?
- If I want to use `nothing` rather than `missing` in my data, is there a way to get concise encoding other than writing `missing`s and manually converting them to `nothing`s after load?

cc @quinnj
