Skip to content

Saturate negative unix timestamp to zero instead of overflow#12443

Merged
alexey-milovidov merged 3 commits intomasterfrom
negative-date-time-saturate-to-zero
Jul 15, 2020
Merged

Saturate negative unix timestamp to zero instead of overflow#12443
alexey-milovidov merged 3 commits intomasterfrom
negative-date-time-saturate-to-zero

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Jul 12, 2020

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Avoid overflow in parsing of DateTime values that will lead to negative unix timestamp in their timezone (for example, 1970-01-01 00:00:00 in Moscow). Saturate to zero instead. This fixes #3470. This fixes #4172.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Jul 12, 2020
@alexey-milovidov
Copy link
Copy Markdown
Member Author

@akuzm Performance test showed "2 faster, 20 slower" in queries without related code paths.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

Yandex synchronization check (only for Yandex employees) Pending — error, check will be restarted

False claim, the check was not restarted, CC @exprmntr.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

Ok, probably it is because I did not merge with master and performance of master was improved.
@akuzm Why it is not merged with master before running tests?

@akuzm
Copy link
Copy Markdown
Contributor

akuzm commented Jul 14, 2020

Ok, probably it is because I did not merge with master and performance of master was improved.
@akuzm Why it is not merged with master before running tests?

It's more complicated -- it choose the master for comparison that is newer than the master it was merged to before build, because the perf test task cloned the repository later, when it was merged to a newer master on github... I have an idea for a fix, will try.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

Performance test Ok.

@alexey-milovidov alexey-milovidov merged commit e9bb468 into master Jul 15, 2020
@alexey-milovidov alexey-milovidov deleted the negative-date-time-saturate-to-zero branch July 15, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datetime condition returns inconsistent result SELECT toDateTime('1970-01-01 00:00:00') -> 1970-01-01 06:28:16 for time zone other than UTC

3 participants