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
Support pushdown approx_distinct(x, e) into pinot #15231
Merged
highker
merged 1 commit into
prestodb:master
from
xiangfu0:fixing_approximate_distinct_with_error_rate
Oct 4, 2020
Merged
Support pushdown approx_distinct(x, e) into pinot #15231
highker
merged 1 commit into
prestodb:master
from
xiangfu0:fixing_approximate_distinct_with_error_rate
Oct 4, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agrawaldevesh
approved these changes
Sep 28, 2020
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.
Is this supported in both Pql and sql code paths ?
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
xiangfu0
force-pushed
the
fixing_approximate_distinct_with_error_rate
branch
from
September 28, 2020 18:42
e18011e
to
8a7c588
Compare
Yes, both places are supported. Pinot directly pass the arguments into function and let functions to handle at. |
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
presto-pinot-toolkit/src/test/java/com/facebook/presto/pinot/query/TestPinotQueryGenerator.java
Show resolved
Hide resolved
xiangfu0
force-pushed
the
fixing_approximate_distinct_with_error_rate
branch
from
September 28, 2020 19:41
8a7c588
to
331deb8
Compare
highker
approved these changes
Oct 4, 2020
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotQueryGenerator.java
Outdated
Show resolved
Hide resolved
xiangfu0
force-pushed
the
fixing_approximate_distinct_with_error_rate
branch
from
October 4, 2020 19:43
331deb8
to
c9ff18f
Compare
xiangfu0
force-pushed
the
fixing_approximate_distinct_with_error_rate
branch
from
October 4, 2020 19:44
c9ff18f
to
3393e40
Compare
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Pinot aggregation pushdown only supports
approx_distinct(x)
but notapprox_distinct(x, e)
.Since pinot supports configurable approximate distinct with query function syntax
distinctCountHll(x, log2m)
(apache/pinot#5564), we can push downapprox_distinct(x, e)
by convertinge
tolog2m
then call pinot function:distinctCountHll
Some ref to log2m:
https://github.com/addthis/stream-lib/blob/master/src/main/java/com/clearspring/analytics/stream/cardinality/HyperLogLog.java#L98
Test plan