-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 backward compatible issue in DistinctCountThetaSketchAggregationFunction #12347
Fix backward compatible issue in DistinctCountThetaSketchAggregationFunction #12347
Conversation
...pache/pinot/core/query/aggregation/function/DistinctCountThetaSketchAggregationFunction.java
Show resolved
Hide resolved
...pache/pinot/core/query/aggregation/function/DistinctCountThetaSketchAggregationFunction.java
Show resolved
Hide resolved
577e5e2
to
db75e44
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12347 +/- ##
============================================
+ Coverage 61.69% 61.76% +0.06%
- Complexity 207 1152 +945
============================================
Files 2424 2424
Lines 132340 132498 +158
Branches 20436 20479 +43
============================================
+ Hits 81651 81834 +183
+ Misses 44693 44657 -36
- Partials 5996 6007 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -53,7 +53,8 @@ public String extractFinalResult(List<ThetaSketchAccumulator> accumulators) { | |||
int numAccumulators = accumulators.size(); | |||
List<Sketch> mergedSketches = new ArrayList<>(numAccumulators); | |||
|
|||
for (ThetaSketchAccumulator accumulator : accumulators) { | |||
for (Object object : accumulators) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please test this if this indeeds helps?
As discussed offline, as a result of the aggregationFunction.merge() step, all Sketch objects should be converted to ThetaSketchAccumulator. So can you clarify why we saw this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! It could be possible that there is only 1 old server returning a non-empty intermediate result, which skipped the merge step in broker.
I've tested this code by setting up a local cluster and running 2 servers with old version and 1 broker with new version, and I don't see exception any more. So we should be good with this hotfix PR.
This PR fixes a backward incompatible issue introduced by this PR: #12042
Printed stacktrace from the broker log: