Flight SQL JDBC: Fix timezone/timestamp handling

未关闭
#732 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
databases

调研方向

首先跟踪 Flight SQL JDBC driver 对 java.sql.Timestamp、LocalDateTime、时区和 Calendar 的处理方式,并将其行为与 issue 中描述的 PostgreSQL JDBC 预期进行比较。完成的标准是:无时区时间戳保留请求的墙上时钟值,带时区的时间戳保留 UTC 时刻,包括跨越 DST 转换时的行为。

由索引模型根据 Issue 内容生成。

描述

Type: enhancement
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.

主要语言
Java
星标
95
派生
154
平均合并
2 天 10 小时
30 天内合并 PR
11

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/arrow-java 的其他 Issue

查看 apache/arrow-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。