Skip to content

Fix exception when using complex aggs with result level caching#7614

Merged
jon-wei merged 7 commits intoapache:masterfrom
jon-wei:complex_agg_cache
May 9, 2019
Merged

Fix exception when using complex aggs with result level caching#7614
jon-wei merged 7 commits intoapache:masterfrom
jon-wei:complex_agg_cache

Conversation

@jon-wei
Copy link
Copy Markdown
Contributor

@jon-wei jon-wei commented May 8, 2019

Fixes #6483

This fixes an issue in the GroupBy/TopN/Timeseries query tool chests where aggregator values from the result level cache (these are finalized values generated by AggregatorFactory.finalizeComputation()) were being incorrectly passed to AggregatorFactory.deserialize() which operates on intermediate aggregator values.

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

LGTM with or without the extraction of a helper function (although I do think it would be good to do that).


Iterator<AggregatorFactory> aggsIter = aggs.iterator();

// When using the result level cache, the agg values seen here are
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a long comment and identical block in each toolchest -- perhaps extract to a helper method in CacheUtil?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Extracted to a helper method in CacheStrategy (CacheUtil is in server which is not a dependency of processing)

jon-wei added a commit to implydata/druid-public that referenced this pull request May 8, 2019
@jon-wei jon-wei merged commit 1b577c9 into apache:master May 9, 2019
@clintropolis clintropolis added this to the 0.14.2 milestone May 10, 2019
clintropolis pushed a commit that referenced this pull request May 10, 2019
* Fix exception when using complex aggs with result level caching

* Add test comments

* checkstyle

* Add helper function for getting aggs from cache

* Move method to CacheStrategy

* Revert QueryToolChest changes

* Update test comments
jihoonson pushed a commit to jihoonson/druid that referenced this pull request May 10, 2019
…he#7614)

* Fix exception when using complex aggs with result level caching

* Add test comments

* checkstyle

* Add helper function for getting aggs from cache

* Move method to CacheStrategy

* Revert QueryToolChest changes

* Update test comments
clintropolis pushed a commit that referenced this pull request May 11, 2019
… (#7634)

* Fix exception when using complex aggs with result level caching

* Add test comments

* checkstyle

* Add helper function for getting aggs from cache

* Move method to CacheStrategy

* Revert QueryToolChest changes

* Update test comments
jihoonson added a commit to implydata/druid-public that referenced this pull request Jun 4, 2019
…he#7614) (apache#7634)

* Fix exception when using complex aggs with result level caching

* Add test comments

* checkstyle

* Add helper function for getting aggs from cache

* Move method to CacheStrategy

* Revert QueryToolChest changes

* Update test comments
jihoonson pushed a commit to implydata/druid-public that referenced this pull request Jun 26, 2019
…he#7614)

* Fix exception when using complex aggs with result level caching

* Add test comments

* checkstyle

* Add helper function for getting aggs from cache

* Move method to CacheStrategy

* Revert QueryToolChest changes

* Update test comments
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.

Exception during sketch aggregations while using Result level cache

3 participants