Kirill Tkalenko created IGNITE-29058:
----------------------------------------
Summary: SQL Calcite: Preserve historical dates in java.sql.Date
and Timestamp conversions
Key: IGNITE-29058
URL: https://issues.apache.org/jira/browse/IGNITE-29058
Project: Ignite
Issue Type: Bug
Reporter: Kirill Tkalenko
Assignee: Kirill Tkalenko
Conversions between Calciteās internal DATE/TIMESTAMP representation and
{{{}java.sql.Date{}}}/{{{}Timestamp{}}} can shift dates before {{1582-10-15}}
because these representations use different calendars.
For example:
* SQL {{DATE '1500-01-02'}} becomes a {{java.sql.Date}} representing
{{{}1499-12-24{}}}.
* {{java.sql.Date.valueOf("1500-01-02")}} becomes SQL {{{}DATE
'1500-01-11'{}}}.
Fix conversions in {{TypeUtils}} to preserve calendar date and time in both
directions, retaining existing time-zone handling. Add regression tests for
historical dates and timestamps.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)