malloy
malloy copied to clipboard
Support percentiles as window functions
Similar to #1555, but supporting the percentile calculations in a calculate:
clause instead of an aggregate:
clause. We should support both percentile_cont
and percentile_disc
, where cont
interpolates between the two closest values, and disc
choses the nearest.
See BQ documentation for intended behavior: https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont