-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add Spectator Histogram SQL functions #18885
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
Add Spectator Histogram SQL functions #18885
Conversation
...java/org/apache/druid/spectator/histogram/sql/SpectatorHistogramPercentileSqlAggregator.java
Fixed
Show fixed
Hide fixed
...java/org/apache/druid/spectator/histogram/sql/SpectatorHistogramPercentileSqlAggregator.java
Fixed
Show fixed
Hide fixed
...java/org/apache/druid/spectator/histogram/sql/SpectatorHistogramPercentileSqlAggregator.java
Fixed
Show fixed
Hide fixed
| .buildMMappedIndex(); | ||
|
|
||
| return walker.add( | ||
| DataSegment.builder() |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
DataSegment.builder
3beeb2d to
ba5d493
Compare
ba5d493 to
1c9f2ed
Compare
1c9f2ed to
cccacaf
Compare
e39924b to
b8369f2
Compare
b8369f2 to
a6be0c7
Compare
...rc/main/java/org/apache/druid/spectator/histogram/SpectatorHistogramCountPostAggregator.java
Outdated
Show resolved
Hide resolved
...java/org/apache/druid/spectator/histogram/sql/SpectatorHistogramPercentileSqlAggregator.java
Show resolved
Hide resolved
...java/org/apache/druid/spectator/histogram/sql/SpectatorHistogramPercentileSqlAggregator.java
Show resolved
Hide resolved
| */ | ||
| public class SpectatorHistogramCountSqlAggregator implements SqlAggregator | ||
| { | ||
| private static final SqlAggFunction FUNCTION_INSTANCE = new SpectatorHistogramCountSqlAggFunction(); |
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.
nit: use OperatorConversions.aggregatorBuilder (easier to read compare to SqlAggFunction's constructor)
| */ | ||
| public class SpectatorHistogramPercentileSqlAggregator implements SqlAggregator | ||
| { | ||
| private static final SqlAggFunction FUNCTION_INSTANCE = new SpectatorHistogramPercentileSqlAggFunction(); |
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.
nit: use OperatorConversions.aggregatorBuilder (easier to read compare to SqlAggFunction's constructor)
Description
Adds Spectator SQL functions:
SPECTATOR_COUNTreturns the # of distinct events inside the histogram (either pre/post aggregated).SPECTATOR_PERCENTILEallows computing single/multiple percentiles over a histogram column (either pre/post aggregated).Release note
Add
SPECTATOR_COUNTandSPECTATOR_PERCENTILESQL functions for operating on Spectator Histograms.This PR has: