You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support for natively fetching `java.time.*` objects through
the JDBC driver.
DateVector
- getObject(LocalDate.class)
DateTimeVector
- getObject(OffsetDateTime.class)
- getObject(LocalDateTime.class)
- getObject(ZonedDateTime.class)
- getObject(Instant.class)
TimeVector
- getObject(LocalTime.class)
This PR also changes the behavior for vectors that include TZ info.
These will now return as `TIMESTAMP_WITH_TIMEZONE`.
The behavior for different ways to access a TimeStampVector are as
follows:
| | Vector with TZ | Vector W/O TZ |
|---------------------------------|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| getTimestamp() | Get timestamp in the vector TZ | Get timestamp in UTC
|
| getTimestamp(calendar) | Get timestamp by adjusting from the vector TZ
to the desired calendar TZ | Get timestamp by adjusting from UTC to the
desired calendar TZ (a bug, IMO) |
| getObject(LocalDateTime.class) | Get LocalDateTime by taking the
timestamp at the vector TZ and taking the "wall-clock" time at that
moment | Treat the epoch value in the vector as the "wall-clock" time |
| getObject(Instant.class) | Get Instant represented by the value in the
vector TZ | Get Instant represented by the value in UTC |
| getObject(OffsetDateTime.class) | Get OffsetDateTime represented by
the value in the vector TZ (will account for daylight adjustment) | Get
OffsetDateTime represented by the value in UTC (will account for
daylight adjustment) |
| getObject(ZonedDateTime.class) | Get ZonedDateTime represented by the
value in the vector at in its TZ | Get ZonedDateTime represented by the
value in the vector at in UTC |
Closes#463
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcDateVectorAccessor.java
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessor.java
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeVectorAccessor.java
0 commit comments