Open mslenc opened 7 years ago
can you provide a reproducer test ?
As far as I can tell, this will reproduce the problem:
I could create a reproducer for this problem.
In PostgreSQL, TIME
returns org.joda.time.LocalTime
, in MySQL it returns scala.concurrent.duration.FiniteDuration
.
What kind of return value would you expect?
For MySQL / FiniteDuration
I'd go for a number in milliseconds and LocalTime
I'd return as String (HH:MM:SS.<milliseconds>
). There is a difference between PostgreSQL and MySQL regarding the column type TIME
, so I think it might make sense to reflect that in the return value as well.
Yeah, MySQL's TIME is somewhat ambiguous in meaning, and can be used for both durations and times.. But still, I wouldn't encode them differently, that it becomes a FiniteDuration seems more of an implementation artifact than anything else.. HH:MM:SS
will match both what the database itself is returning (and expecting to receive!), as well as the PostgreSQL version..
Ok, then I'll make it return "HH:MM:SS.
Update: PR is updated
Is there any workaround for this problem?
@kirillkh you could update your queries to convert the time column with TO_CHAR
, then in the verticle retrieve the time as a String
What worked for me: TABLE.TIME.cast(String.class)
The stack trace is: