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

reuse stats for average #1785

Merged
merged 2 commits into from
Jan 13, 2023
Merged

reuse stats for average #1785

merged 2 commits into from
Jan 13, 2023

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Jan 13, 2023

No description provided.

@codecov-commenter
Copy link

Codecov Report

Merging #1785 (78273bf) into main (2650111) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1785   +/-   ##
=======================================
  Coverage   94.11%   94.12%           
=======================================
  Files         282      282           
  Lines       53113    53079   -34     
=======================================
- Hits        49986    49959   -27     
+ Misses       3127     3120    -7     
Impacted Files Coverage Δ
src/aggregation/intermediate_agg_result.rs 98.43% <100.00%> (+<0.01%) ⬆️
src/aggregation/metric/average.rs 86.95% <100.00%> (+0.74%) ⬆️
src/aggregation/metric/stats.rs 97.23% <100.00%> (+0.02%) ⬆️
src/aggregation/segment_agg_result.rs 91.41% <100.00%> (-0.09%) ⬇️
fastfield_codecs/src/null_index/sparse.rs 95.27% <0.00%> (-0.19%) ⬇️
src/indexer/merger.rs 98.84% <0.00%> (-0.07%) ⬇️
src/indexer/segment_updater.rs 95.44% <0.00%> (+0.13%) ⬆️
src/query/boolean_query/block_wand.rs 97.06% <0.00%> (+0.20%) ⬆️
src/fastfield/multivalued/mod.rs 98.45% <0.00%> (+0.38%) ⬆️
... and 1 more

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

/// Contains mergeable version of average data.
#[derive(Default, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IntermediateAverage {
pub(crate) sum: f64,
pub(crate) doc_count: u64,
pub(crate) doc_count: u32,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any inherent limit so that this is limited to 2^32 documents?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually that change is incorrect, it's only valid on a segment level

@PSeitz PSeitz merged commit 6ca9a47 into main Jan 13, 2023
fulmicoton pushed a commit that referenced this pull request Jan 16, 2023
* reuse stats for average

* fix count type
Hodkinson pushed a commit to Hodkinson/tantivy that referenced this pull request Jan 30, 2023
* reuse stats for average

* fix count type
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.

4 participants