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

Correctly throw exception on attempt to parse invalid Date #25909

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

alexey-milovidov
Copy link
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Correctly throw exception on attempt to parse invalid Date. This closes #6481.

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

Let's look at the performance test.
Also need to check for possible performance regressions manually.

@alexey-milovidov
Copy link
Member Author

SELECT count() FROM system.numbers WHERE NOT ignore(toDate(toString(toDate(toUInt16(number)))))

This PR: 410.24 MB/s.
master: 405.34 MB/s.

@alexey-milovidov
Copy link
Member Author

SELECT count() FROM system.numbers WHERE NOT ignore(toDate(materialize('2020-01-01')))

This PR: 678.09 MB/s.
master: 655.49 MB/s.

@alexey-milovidov
Copy link
Member Author

Performance test is Ok. I'm surprised.

@alexey-milovidov alexey-milovidov self-assigned this Jul 2, 2021
@kitaisreal kitaisreal self-assigned this Jul 2, 2021
@kitaisreal kitaisreal merged commit f16e8c3 into master Jul 2, 2021
@kitaisreal kitaisreal deleted the invalid-date branch July 2, 2021 17:54
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.

Incorrect date format can be incorrectly parsed in comparison condition.
3 participants