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

adds changes for Ord implementation of Timestamp #410

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

desaikd
Copy link
Contributor

@desaikd desaikd commented Aug 30, 2022

Description of changes:
This PR works on changes for Ord implementation of Timestamp to consider both datetime and fractional seconds for comparison.

  • considers datetime comparison result as well as fractional seconds
    comparison result for Ord
  • changes fractional_seconds_equal() to convert Option<&Mantissa> to &Mantissa, where default value Mantissa::Digits(0) is used for None. This guarantees a fractional_seconds value to be present at all times and makes it easier to compare those fractional seconds.

Test:

  • adds test case for fractional second and year precision timestamps
    ordering

* considers datetime comparison result as well as fractional seconds
comparison result for Ord
* adds test case for fractional second and year precision timestamps
ordering
@desaikd desaikd requested a review from zslayton August 30, 2022 23:05
@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #410 (5bff7cc) into main (9445115) will decrease coverage by 0.00%.
The diff coverage is 83.78%.

@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
- Coverage   88.47%   88.47%   -0.01%     
==========================================
  Files          82       82              
  Lines       14059    14076      +17     
==========================================
+ Hits        12439    12454      +15     
- Misses       1620     1622       +2     
Impacted Files Coverage Δ
src/types/timestamp.rs 87.81% <83.78%> (+0.10%) ⬆️
src/text/raw_text_reader.rs 90.42% <0.00%> (-0.17%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@zslayton zslayton left a comment

Choose a reason for hiding this comment

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

🚀

@desaikd desaikd merged commit e02715f into main Sep 1, 2022
@desaikd desaikd deleted the desaikd-timestamp-ord branch September 27, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants