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 cache bug in stats module #5650

Merged
merged 1 commit into from
Apr 17, 2018
Merged

Conversation

drcrallen
Copy link
Contributor

@drcrallen drcrallen commented Apr 16, 2018

#2525 introduced the stats module, but it had some bugs in the cache keys, hash codes, and toString methods.

  • Use CacheKeyBuilder
  • Remove unused reset method
  • auto-gen hash key, to string, and equals methods.

return new CacheKeyBuilder(AggregatorUtil.VARIANCE_CACHE_TYPE_ID)
.appendString(fieldName)
.appendString(inputType)
.appendBoolean(isVariancePop)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: isVariancePop is not necessary in getCacheKey(), equals(), and hashCode() because it is decided based on estimator.

@jihoonson jihoonson merged commit 8e441cd into apache:master Apr 17, 2018
@drcrallen drcrallen deleted the variance/cachefix branch April 20, 2018 20:21
sathishsri88 pushed a commit to sathishs/druid that referenced this pull request May 8, 2018
@jihoonson jihoonson added this to the 0.12.2 milestone Jul 5, 2018
jihoonson pushed a commit to implydata/druid-public that referenced this pull request Jul 6, 2018
jihoonson pushed a commit to jihoonson/druid that referenced this pull request Jul 6, 2018
gianm pushed a commit that referenced this pull request Jul 9, 2018
leventov pushed a commit to metamx/druid that referenced this pull request Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants