Check field nullability for custom extension types (#69)
authorJacob Quinn <quinn.jacobd@gmail.com>
Thu, 19 Nov 2020 17:36:57 +0000 (10:36 -0700)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 17:36:57 +0000 (10:36 -0700)
commitc33a8186d1f5f3972483c87ab9307afb58d936db
tree7121a95dfe343a176ae457b2eec281915dc3ea2e
parent73e08dbc8e1cfa7e1fc8bbc9938d0a3660ce2b45
Check field nullability for custom extension types (#69)

For custom extension types (currently automatically supported for `Char`
and `Symbol` types), we were failing to take into account whether the
field was nullable or not; this led to the case where a column might be
`['a', missing]`, but when deserializing, the column type was just
`Char` instead of `Union{Char, Missing}`. The fix is to enhance the
`ArrowTypes.extensiontype` function to also take the `field` argument
and check the nullability before returning.
src/arrowtypes.jl
src/eltypes.jl