JuliaTime / TimeZones.jl

IANA time zone database access for the Julia programming language
Other
86 stars 51 forks source link

Add Arrow support for other types #377

Open omus opened 2 years ago

omus commented 2 years ago

Having Arrow support for the various types defined by this package would be great

julia> using Arrow, TimeZones

julia> table = (; col=[FixedTimeZone("UTC-5")])
(col = FixedTimeZone[tz"UTC-05:00"],)

julia> t = Arrow.Table(Arrow.tobuffer(table))
Arrow.Table with 1 rows, 1 columns, and schema:
 :col  …  NamedTuple{(:name, :offset), Tuple{String, NamedTuple{(:std, :dst), Tuple{Dates.Second, Dates.Second}}}}

julia> eltype(t.col) == FixedTimeZone  # Arrow support would make this `true`
false

Definitely should be called out that Arrow.jl itself has support for ZonedDateTime so we can avoid re-defining those rules

omus commented 2 years ago

I'll mention that I worked on this and had Arrow support working for FixedTimeZone outside of the TimeZones.jl package. Oddly, adding it to TimeZones.jl results in me extending a different ArrowTypes module which breaks the support. I haven't had time to dig into further.