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

Fix median calculation in MedianAbsoluteDeviationAggregatorTests #38979

Merged
merged 3 commits into from
Feb 19, 2019

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Feb 15, 2019

Fixes an error in median calculation in
MedianAbsoluteDeviationAggregatorTests for odd number of sample points,
which causes some rare test failures.

Fixes #38937

Fixes an error in median calculation in
MedianAbsoluteDeviationAggregatorTests for odd number of sample points.

Fixes elastic#38937
@imotov imotov added >bug :Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI v8.0.0 v7.2.0 labels Feb 15, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@imotov imotov requested a review from andyb-elastic February 15, 2019 21:27
Copy link
Contributor

@andyb-elastic andyb-elastic left a comment

Choose a reason for hiding this comment

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

LGTM I should have caught this earlier, thanks for fixing it

median = (sorted[halfway - 1] + sorted[halfway]) / 2d;
} else {
// odd
median = (sorted[halfway -1]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit so small I feel bad even mentioning it - can you change the spacing to halfway - 1 so it's consistent

@imotov imotov merged commit bb796b3 into elastic:master Feb 19, 2019
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 20, 2019
…follow

* elastic/master: (37 commits)
  Enable test logging for TransformIntegrationTests#testSearchTransform.
  stronger wording for ilm+rollover in docs (elastic#39159)
  Mute SingleNodeTests (elastic#39156)
  AwaitsFix XPackUsageIT#testXPackCcrUsage.
  Resolve concurrency with watcher trigger service (elastic#39092)
  Fix median calculation in MedianAbsoluteDeviationAggregatorTests (elastic#38979)
  [DOCS] Edits the remote clusters documentation (elastic#38996)
  add version 6.6.2
  Revert "Mute failing test 20_mix_typless_typefull (elastic#38781)" (elastic#38912)
  Rebuild remote connections on profile changes (elastic#37678)
  Document 'max_size' parameter as shard size for rollover (elastic#38750)
  Add some missing toString() implementations (elastic#39124)
  Migrate Streamable to Writeable for cluster block package (elastic#37391)
  fix RethrottleTests retry (elastic#38978)
  Disable date parsing test in non english locale (elastic#39052)
  Remove BCryptTests (elastic#39098)
  [ML] Stop the ML memory tracker before closing node (elastic#39111)
  Allow retention lease operations under blocks (elastic#39089)
  ML refactor DatafeedsConfig(Update) so defaults are not populated in queries or aggs (elastic#38822)
  Fix retention leases sync on recovery test
  ...
imotov added a commit that referenced this pull request Feb 20, 2019
)

Fixes an error in median calculation in
MedianAbsoluteDeviationAggregatorTests for odd number of sample points,
which causes some rare test failures.

Fixes #38937
@imotov imotov deleted the issue-38937-mad-calculator branch May 1, 2020 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] MedianAbsoluteDeviationAggregatorTests.testSomeMatchesSortedNumericDocValues fails (seed-specific)
4 participants