Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distsql: timestamps don't roundtrip properly #28110

Closed
jordanlewis opened this issue Jul 31, 2018 · 0 comments · Fixed by #28112
Closed

distsql: timestamps don't roundtrip properly #28110

jordanlewis opened this issue Jul 31, 2018 · 0 comments · Fixed by #28112
Assignees
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@jordanlewis
Copy link
Member

[email protected]:59508/defaultdb> select '2000-05-05 10:00:00+03'::timestamp;
+---------------------------+
|         timestamp         |
+---------------------------+
| 2000-05-05 10:00:00+00:00 |
+---------------------------+
(1 row)

Time: 521.896µs

[email protected]:59508/defaultdb> select '2000-05-05 10:00:00+03'::timestamp from t;
+---------------------------+
|         timestamp         |
+---------------------------+
| 2000-05-05 07:00:00+00:00 |
+---------------------------+
(1 row)

Time: 959.453µs

The output should be identical.

@jordanlewis jordanlewis added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-execution Relating to SQL execution. labels Jul 31, 2018
@jordanlewis jordanlewis self-assigned this Jul 31, 2018
craig bot pushed a commit that referenced this issue Jul 31, 2018
28112: sql: strip timezone info from DTimestamp parsing r=jordanlewis a=jordanlewis

Previously, parsing a DTimestamp would silently retain timezone
information, even though it wouldn't get printed out in many cases. This
led to problems with timestamp serialization in DistSQL mode in
particular.

Fixes #28110.

Release note (bug fix): ensure that the timestamp data type never
retains a timezone and renders consistently across a distributed
computation flow.

Co-authored-by: Jordan Lewis <[email protected]>
@craig craig bot closed this as completed in #28112 Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant