Flight SQL JDBC: Fix timezone/timestamp handling
- 主要言語
- Java
- スター
- 94
- フォーク
- 152
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 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 の期待される動作と比較します。naive timestamp が要求された wall-clock value を保持し、zoned timestamp が UTC instant を保持すること(DST の遷移をまたぐ場合の動作を含む)が完了の条件です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100