Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Nov 24, 2018
2 parents 3517714 + 7238a08 commit e2fe2a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ function juliatype(col::Metadata.Column)
col.values.null_count == 0 ? T : Union{T,Missing}
end

feathertype(::Type{T}) where T = METADATA_TYPE_DICT[T]
function feathertype(::Type{T}) where T
if !haskey(METADATA_TYPE_DICT, T)
throw(ArgumentError("Type $T is not supported by the Feather format."))
else
return METADATA_TYPE_DICT[T]
end
end
feathertype(::Type{Union{T,Missing}}) where T = feathertype(T)
feathertype(::Type{<:Arrow.Datestamp}) = Metadata.INT32
feathertype(::Type{<:Arrow.Timestamp}) = Metadata.INT64
Expand Down

0 comments on commit e2fe2a4

Please sign in to comment.