Flight SQL JDBC: Fix timezone/timestamp handling
- 主要语言
- Java
- 星标
- 94
- 派生
- 152
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 11
描述
### 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.
贡献指南
调研方向
首先跟踪 Flight SQL JDBC driver 对 java.sql.Timestamp、LocalDateTime、时区和 Calendar 的处理方式,并将其行为与 issue 中描述的 PostgreSQL JDBC 预期进行比较。完成的标准是:无时区时间戳保留请求的墙上时钟值,带时区的时间戳保留 UTC 时刻,包括跨越 DST 转换时的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100