Skip to content

Commit

Permalink
Fix null pointer exception when a timestamp with timezone field has a…
Browse files Browse the repository at this point in the history
… null value
  • Loading branch information
lpoulain committed Mar 20, 2023
1 parent 59baecb commit ea1e818
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@
(fn []
(let [zonedDateTime (.getObject rset i java.time.ZonedDateTime)
utcTimeZone (java.time.ZoneId/of "UTC")]
(.toOffsetDateTime (.withZoneSameInstant zonedDateTime utcTimeZone))
(cond
(nil? zonedDateTime) nil
:else (.toOffsetDateTime (.withZoneSameInstant zonedDateTime utcTimeZone)))
)))

(defmethod sql-jdbc.execute/read-column-thunk [:starburst Types/TIME_WITH_TIMEZONE]
Expand Down

0 comments on commit ea1e818

Please sign in to comment.