apache / apache/arrow-java

Flight SQL JDBC: Fix timezone/timestamp handling

Abierto
#732 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Type: enhancement
Lenguaje dominante
Java
Estrellas
94
Forks
152
Merge medio
3 d 16 h
PR fusionados (30 d)
11

Descripción

### Describe the enhancement requested

I believe the JDBC driver is handling timezones/timestamps/java.sql.Timestamp entirely incorrectly.

- Timestamps are round-tripped through LocalDateTime always. I believe this is wrong for timestamps with timezones: we should not round trip through a wall clock time since the same wall clock time may correspond to multiple different instants (during a DST transition)
- From experimenting with the PostgreSQL JDBC driver, it appears that when requesting a java.sql.Timestamp, the expected behavior is:

- Naive timestamp: return a Timestamp that appears to have the right wall clock time in the given Calendar, or the system time zone if no calendar is supplied. (In other words, use Timestamp as a janky LocalDateTime.)
- Zoned timestamp: return a Timestamp whose value is the timestamp in UTC. (In other words, use Timestamp as an Instant.)

It appears our driver does not do this properly.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza rastreando cómo el Flight SQL JDBC driver gestiona java.sql.Timestamp, LocalDateTime, las zonas horarias y Calendar, comparando el comportamiento con las expectativas de PostgreSQL JDBC descritas en el issue. Se considera completado cuando las marcas de tiempo ingenuas conservan el valor de hora de reloj solicitado y las marcas de tiempo con zona conservan el instante UTC, incluido el comportamiento durante las transiciones de DST.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
databases
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.