Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Added support to compare intervals #746

Merged
merged 1 commit into from
Jan 9, 2022
Merged

Added support to compare intervals #746

merged 1 commit into from
Jan 9, 2022

Conversation

jorgecarleitao
Copy link
Owner

This PR adds support to compare months_days_nano and days_ms intervals.

Note that these types do not implement partialOrd (since there is no constraints over how many days are represented in ms or months in days). Thus, the implementation can only exist for eq and neq, which is what this PR does.

For this to happen, I had to split the trait Simd8Lanes in 3, so that we can describe the different constraints above in traits.

The rest is just boilerplate to keep the code tidy and small.

@jorgecarleitao jorgecarleitao added the feature A new feature label Jan 9, 2022
@codecov
Copy link

codecov bot commented Jan 9, 2022

Codecov Report

Merging #746 (0f7b476) into main (1c78fe9) will increase coverage by 0.08%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #746      +/-   ##
==========================================
+ Coverage   70.75%   70.84%   +0.08%     
==========================================
  Files         313      313              
  Lines       16927    16931       +4     
==========================================
+ Hits        11976    11994      +18     
+ Misses       4951     4937      -14     
Impacted Files Coverage Δ
src/compute/comparison/primitive.rs 100.00% <ø> (ø)
src/compute/comparison/simd/mod.rs 95.83% <ø> (ø)
src/compute/nullif.rs 0.00% <0.00%> (ø)
src/compute/comparison/mod.rs 39.53% <43.47%> (+16.45%) ⬆️
src/compute/arithmetics/time.rs 26.60% <0.00%> (+0.91%) ⬆️
src/io/avro/read/schema.rs 55.91% <0.00%> (+1.07%) ⬆️
src/compute/boolean.rs 94.54% <0.00%> (+3.63%) ⬆️
src/compute/comparison/boolean.rs 91.83% <0.00%> (+4.08%) ⬆️
src/compute/comparison/utf8.rs 72.97% <0.00%> (+5.40%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c78fe9...0f7b476. Read the comment docs.

@jorgecarleitao jorgecarleitao force-pushed the cmp_interval branch 2 times, most recently from a5d638b to fa66947 Compare January 9, 2022 17:41
@jorgecarleitao jorgecarleitao merged commit 4c29966 into main Jan 9, 2022
@jorgecarleitao jorgecarleitao deleted the cmp_interval branch January 9, 2022 20:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant