ararslan commented on issue #526:
URL: https://github.com/apache/arrow-julia/issues/526#issuecomment-2372590222

   Looks like the right `convert` method exists and is general enough to handle 
all of the above cases, it's just `fromarrow` that's currently too specific: 
it's assuming all incoming `Arrow.Time`s are nanoseconds. I think this is all 
that's needed:
   ```diff
   diff --git a/src/eltypes.jl b/src/eltypes.jl
   index ffc53c0..6071365 100644
   --- a/src/eltypes.jl
   +++ b/src/eltypes.jl
   @@ -251,7 +251,7 @@ ArrowTypes.toarrow(x::Dates.Time) = convert(TIME, x)
    const TIME_SYMBOL = Symbol("JuliaLang.Time")
    ArrowTypes.arrowname(::Type{Dates.Time}) = TIME_SYMBOL
    ArrowTypes.JuliaType(::Val{TIME_SYMBOL}, S) = Dates.Time
   -ArrowTypes.fromarrow(::Type{Dates.Time}, x::TIME) = convert(Dates.Time, x)
   +ArrowTypes.fromarrow(::Type{Dates.Time}, x::Time) = convert(Dates.Time, x)
    ArrowTypes.default(::Type{Dates.Time}) = Dates.Time(1, 1, 1)
   
    struct Timestamp{U,TZ} <: ArrowTimeType
   ```


-- 
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]

Reply via email to