baumgold commented on issue #285:
URL: https://github.com/apache/arrow-julia/issues/285#issuecomment-1042488559
As a work-around all nullable types can be converted to use Missing instead
of Nothing, which seems to allow Python to read the Arrow files generated by
Arrow.jl. The issue is now we cannot distinguish between nothing (converted to
missing) and actual missing.
```julia
julia> ArrowTypes.ArrowType(::Type{Union{Nothing,T}}) where {T} =
Union{Missing,ArrowTypes.ArrowType(T)}
julia> Arrow.write("/tmp/nothing.arrow",
(col=Vector{Union{Nothing,Int32}}([1,2,3,nothing]),))
"/tmp/nothing.arrow"
julia> Arrow.Table("/tmp/nothing.arrow")
Arrow.Table with 4 rows, 1 columns, and schema:
:col Union{Missing, Int32}
```
```python
In [1]: pandas.read_feather("/tmp/nothing.arrow")
Out[1]:
col
0 1.0
1 2.0
2 3.0
3 NaN
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]