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

Support quantiles sketch post-aggregators #163

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/panoramix/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,19 @@ defmodule Panoramix.Query do
post_aggregation_field_accessor(post_aggregator, :fields, pa_list)
end

defp build_post_aggregation({theta_sketch_post_aggregator, _, [field | options]})
when theta_sketch_post_aggregator in [:thetaSketchEstimate, :thetaSketchToString] do
defp build_post_aggregation({sketch_post_aggregator, _, [field | options]})
when sketch_post_aggregator in [
:thetaSketchEstimate,
:thetaSketchToString,
:quantilesDoublesSketchToQuantile,
:quantilesDoublesSketchToQuantiles,
:quantilesDoublesSketchToHistogram,
:quantilesDoublesSketchToRank,
:quantilesDoublesSketchToCDF,
:quantilesDoublesSketchToString,
] do
pa = build_post_aggregation(field)
post_aggregation_field_accessor(theta_sketch_post_aggregator, :field, pa, options)
post_aggregation_field_accessor(sketch_post_aggregator, :field, pa, options)
end

defp build_post_aggregation({:thetaSketchSetOp, _, [func, fields]}) do
Expand Down