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

Change to use internal chrono errors in parsing datetime #1010

Merged
merged 2 commits into from
Nov 19, 2022

Conversation

ever0de
Copy link
Member

@ever0de ever0de commented Nov 19, 2022

We previously added an error that mimics chrono::format::ParseErrorKind.
You may need to react to chrono updates, but there are unreachable branches that can go unnoticed.

But here chrono doesn't provide a public constructor for ParseError.
https://github.com/chronotope/chrono/blob/d147e9a2152d1d961372bf5a6a261c644746efdf/src/format/mod.rs#L347-L348
Therefore, it is not compatible with the existing test method.

So we change the way we test

@ever0de ever0de added the improvement Improvements for existing features label Nov 19, 2022
@ever0de ever0de self-assigned this Nov 19, 2022
@ever0de ever0de force-pushed the change-to-use-internal-chrono-errors branch from 74c0870 to fb8b506 Compare November 19, 2022 05:42
@coveralls
Copy link

coveralls commented Nov 19, 2022

Pull Request Test Coverage Report for Build 3502272482

  • 58 of 64 (90.63%) changed or added relevant lines in 3 files are covered.
  • 22 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.06%) to 98.326%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/executor/evaluate/error.rs 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
core/src/executor/evaluate/error.rs 1 0%
core/src/executor/aggregate/mod.rs 2 81.82%
test-suite/src/tester/mod.rs 19 87.5%
Totals Coverage Status
Change from base Build 3489369541: -0.06%
Covered Lines: 39696
Relevant Lines: 40372

💛 - Coveralls

Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meaningful simplification improvement! :D Looks all nice! Thanks a lot 👍

@panarch panarch changed the title Change to use internal chrono errors Change to use internal chrono errors in parsing datetime Nov 19, 2022
@panarch panarch merged commit 6ddba4e into gluesql:main Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants