Skip to content

Add percentile aggregation types (p25-p99)#1

Open
fayvor wants to merge 2 commits into
masterfrom
fayvor/percentile-aggregations
Open

Add percentile aggregation types (p25-p99)#1
fayvor wants to merge 2 commits into
masterfrom
fayvor/percentile-aggregations

Conversation

@fayvor
Copy link
Copy Markdown
Collaborator

@fayvor fayvor commented May 14, 2026

Summary

  • Adds percentile aggregation types: p25, p50, p75, p90, p95, p99
  • Uses PERCENTILE_CONT SQL function for multi-stage measures
  • Enables benchmarking use cases (e.g., "how does my org compare to the median?")

Changes

  • CubeValidator.ts: Added percentile types to measure type validators
  • BaseQuery.js: Added SQL generation for PERCENTILE_CONT(x) WITHIN GROUP (ORDER BY ...)

Test plan

  • Verified percentile measures work with add_group_by for multi-stage aggregations
  • Tested with reports_benchmark cube in cube-internal

🤖 Generated with Claude Code

Fayvor Love and others added 2 commits May 14, 2026 09:20
Added p25, p50, p75, p90, p95 measure types that generate
PERCENTILE_CONT SQL for multi-stage aggregations. Enables
benchmarking use cases like "median reports per org".

Changes:
- CubeValidator.ts: Added types to validation lists
- BaseQuery.js: Added SQL generation for percentiles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extends the percentile measure types to include p99 (99th
percentile) for capturing extreme outliers in distributions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant