quinnj commented on code in PR #371:
URL: https://github.com/apache/arrow-julia/pull/371#discussion_r1062953652
##########
src/ArrowTypes/src/ArrowTypes.jl:
##########
@@ -344,6 +344,9 @@ function ToArrow(x::A) where {A}
for i = 2:length(x)
@inbounds T = promoteunion(T, typeof(toarrow(x[i])))
end
+ if T === Missing
Review Comment:
So there's an interesting case to consider here: `Any[missing, missing]`.
The array eltype is `Any`, so we hit this codepath, and `T` is `Missing`, so
we'll hit this new branch, so uh-oh, that might do something bad, right? Well,
`ArrowTypes.default(Any)` returns `nothing`, and `toarrow(nothing)`
returns.......`missing`! So we end up with the right `T` in the end, albeit
somewhat unexpectedly? I would only worry a bit if we end up changing
`toarrow(::Nothing) = missing`.
For now, can we just add a test for this case and then deal w/ it later if
necessary?
--
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]