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

[saffron] cleanup query #2975

Merged
merged 7 commits into from
Jan 30, 2025
Merged

Conversation

martyall
Copy link
Contributor

Summary

@marcbeunardeau88 did the initial index arithmetic to make the query interface, this PR just cleans up that work. I added additional tests to cover edge cases and attempted to make it more idiomatic (in an opinionated fashion).

The commits are atomic, individual diffs should be clear

Changes

  • add an error type for malformed queries and force construction of well formed queries through smart constructor into_query_field. Added tests. 416ed93
  • remove hard coded use of values like 31 (482964f, ffa98c7) and 2 ^ 16 (416ed93)
  • Use the iterator to fulfill the query 3935f75
  • Added test to check that the nil query doesn't throw an error af1b31b

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 96.21212% with 5 lines in your changes missing coverage. Please review.

Please upload report for BASE (marc/query-saffron@e3253d3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
saffron/src/utils.rs 96.21% 5 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             marc/query-saffron    #2975   +/-   ##
=====================================================
  Coverage                      ?   76.91%           
=====================================================
  Files                         ?      261           
  Lines                         ?    61520           
  Branches                      ?        0           
=====================================================
  Hits                          ?    47317           
  Misses                        ?    14203           
  Partials                      ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martyall martyall force-pushed the martin/marc/query-saffron-cleanup branch from c9c1cc9 to 4335963 Compare January 30, 2025 01:13
@martyall martyall force-pushed the martin/marc/query-saffron-cleanup branch from 4335963 to 47fa03d Compare January 30, 2025 01:19
@martyall martyall marked this pull request as ready for review January 30, 2025 02:53
@martyall martyall merged commit abf307b into marc/query-saffron Jan 30, 2025
13 checks passed
@martyall martyall deleted the martin/marc/query-saffron-cleanup branch January 30, 2025 18:29
@martyall martyall mentioned this pull request Jan 30, 2025
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.

2 participants