Skip to content

handle empty sketches#7526

Merged
jon-wei merged 4 commits intoapache:masterfrom
AlexanderSaydakov:datasketches-quantiles-empty
Apr 25, 2019
Merged

handle empty sketches#7526
jon-wei merged 4 commits intoapache:masterfrom
AlexanderSaydakov:datasketches-quantiles-empty

Conversation

@AlexanderSaydakov
Copy link
Copy Markdown
Contributor

this is to address #7486

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Apr 23, 2019

Could you add a test for this please? (It seems like the kind of thing that's likely to get missed if the code is ever refactored, so a test is good to protect against that.)

@AlexanderSaydakov
Copy link
Copy Markdown
Contributor Author

Could you point me to the best example of a test for such a purpose? Should it be a micro-test (minimalistic unit test) or some sort of an integration test similar to what we do now in DoublesSketchAggregatorTest where we construct a json query and run it using the AggregationTestHelper?

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Apr 23, 2019

@AlexanderSaydakov I am not intimately familiar with the code, but I'd guess that a minimalistic unit test would be best. In general I prefer unit tests when feasible.

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 after CI - thanks @AlexanderSaydakov!

@AlexanderSaydakov
Copy link
Copy Markdown
Contributor Author

I don't understand what happened with the inspection:
Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
[22:26:11] 30896

@jon-wei
Copy link
Copy Markdown
Contributor

jon-wei commented Apr 25, 2019

TeamCity inspection report doesn't show any new errors in the files affected by this patch, merging

@jon-wei jon-wei merged commit 9d8f934 into apache:master Apr 25, 2019
clintropolis pushed a commit to clintropolis/druid that referenced this pull request Apr 25, 2019
* handle empty sketches

* return array of NaN in case of empty sketch

* noinspection ForLoopReplaceableByForEach in tests

* style fixes
clintropolis added a commit that referenced this pull request Apr 25, 2019
* handle empty sketches

* return array of NaN in case of empty sketch

* noinspection ForLoopReplaceableByForEach in tests

* style fixes
@jihoonson jihoonson added this to the 0.14.1 milestone Apr 26, 2019
gianm pushed a commit to implydata/druid-public that referenced this pull request May 10, 2019
* handle empty sketches

* return array of NaN in case of empty sketch

* noinspection ForLoopReplaceableByForEach in tests

* style fixes
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