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

Backwards compatible theta sketch aggregation #12288

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

davecromberge
Copy link
Member

@davecromberge davecromberge commented Jan 19, 2024

Servers running on versions before upgrading Pinot to the ThetaSketchAccumulator would return Sketches directly to the merge function. This ensures that there is backwards compatibility between the two.

This PR can be tagged with bugfix and addresses bug reported in #12042 (comment)

Servers running on versions before upgrading Pinot to the ThetaSketchAccumulator
would return Sketches directly to the merge function.  This ensures that there
is backwards compatibility between the two.
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (17e1aa1) 61.62% compared to head (48ebe00) 61.58%.
Report is 3 commits behind head on master.

Files Patch % Lines
...n/DistinctCountThetaSketchAggregationFunction.java 37.50% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12288      +/-   ##
============================================
- Coverage     61.62%   61.58%   -0.04%     
  Complexity     1153     1153              
============================================
  Files          2415     2415              
  Lines        131476   131508      +32     
  Branches      20303    20310       +7     
============================================
- Hits          81020    80988      -32     
- Misses        44528    44599      +71     
+ Partials       5928     5921       -7     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (ø)
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 61.50% <37.50%> (-0.07%) ⬇️
java-21 61.47% <37.50%> (-0.04%) ⬇️
skip-bytebuffers-false 61.55% <37.50%> (-0.05%) ⬇️
skip-bytebuffers-true 61.42% <37.50%> (-0.03%) ⬇️
temurin 61.58% <37.50%> (-0.04%) ⬇️
unittests 61.57% <37.50%> (-0.04%) ⬇️
unittests1 46.62% <37.50%> (-0.01%) ⬇️
unittests2 27.78% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jackjlli jackjlli left a comment

Choose a reason for hiding this comment

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

Thanks @davecromberge for the fast turnaround! Would you mind adding some thetha sketch queries in the pinot-compatibility-verifier test suite?

You can see some some queries in this file path in the repo:
compatibility-verifier/sample-test-suite/config/queries/feature-test-1-sql.queries
Thanks again for your contributions!

@davecromberge
Copy link
Member Author

Hi @jackjlli thanks for pointing me to those tests. I've tried to replicate the problem using different commit refs in git history but it turns out that the merge function is not exercised in the compat checker. This is because only one server is started in the test suite.
Nevertheless, I've added the theta sketch aggregation to the queries and result tests for future coverage.

@davecromberge davecromberge marked this pull request as ready for review January 20, 2024 22:01
Copy link
Member

@jackjlli jackjlli left a comment

Choose a reason for hiding this comment

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

Thanks @davecromberge for fixing it! Here is the issue to track the work of testing with multiple brokers and servers in the compatibility test, so that such edge case can be easily captured: #12296

@jackjlli jackjlli merged commit 5cc7231 into apache:master Jan 21, 2024
19 checks passed
SabrinaZhaozyf pushed a commit to SabrinaZhaozyf/incubator-pinot that referenced this pull request Jan 23, 2024
* Backwards compatible theta sketch aggregation

Servers running on versions before upgrading Pinot to the ThetaSketchAccumulator
would return Sketches directly to the merge function.  This ensures that there
is backwards compatibility between the two.

* Add Theta Sketch distinct count queries to compatibility check queries
sajjad-moradi pushed a commit that referenced this pull request Jan 23, 2024
* Backwards compatible theta sketch aggregation

Servers running on versions before upgrading Pinot to the ThetaSketchAccumulator
would return Sketches directly to the merge function.  This ensures that there
is backwards compatibility between the two.

* Add Theta Sketch distinct count queries to compatibility check queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants