Bas van Schaik 2017-04-26 22:56:25 +01:00 committed by Fangjin Yang
parent 52f7bb091d
commit 54463941b9
2 changed files with 20 additions and 3 deletions

View File

@ -141,9 +141,18 @@ public class SketchEstimatePostAggregator implements PostAggregator
if (!name.equals(that.name)) {
return false;
}
if (errorBoundsStdDev != that.errorBoundsStdDev) {
if (errorBoundsStdDev == null ^ that.errorBoundsStdDev == null) {
// one of the two stddevs (not both) are null
return false;
}
if (errorBoundsStdDev != null && that.errorBoundsStdDev != null &&
errorBoundsStdDev.intValue() != that.errorBoundsStdDev.intValue()) {
// neither stddevs are null, Integer values don't match
return false;
}
return field.equals(that.field);
}

View File

@ -161,11 +161,19 @@ public class SketchMergeAggregatorFactory extends SketchAggregatorFactory
if (shouldFinalize != that.shouldFinalize) {
return false;
}
if (errorBoundsStdDev != that.errorBoundsStdDev) {
if (errorBoundsStdDev == null ^ that.errorBoundsStdDev == null) {
// one of the two stddevs (not both) are null
return false;
}
return isInputThetaSketch == that.isInputThetaSketch;
if (errorBoundsStdDev != null && that.errorBoundsStdDev != null &&
errorBoundsStdDev.intValue() != that.errorBoundsStdDev.intValue()) {
// neither stddevs are null, Integer values don't match
return false;
}
return isInputThetaSketch == that.isInputThetaSketch;
}
@Override