Skip to content

feat: validate sketch family calls and report dialect compatibility - #2749

Open
betodealmeida wants to merge 4 commits into
mainfrom
feat/tdigest-reaggregation
Open

betodealmeida wants to merge 4 commits into
mainfrom
feat/tdigest-reaggregation

Conversation

@betodealmeida

@betodealmeida betodealmeida commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Make sketch-family compatibility metadata reflect whether the entire metric can actually decompose. Share the check between REST and GraphQL, enforce declared output dialects, and validate aggregate calls before DISTINCT or other fallback paths can bypass validation.

Treat unsupported stored sketch parameters as a non-match, and return actionable errors for malformed stored reaggregation declarations.

Test Plan

  • Passed 279 focused tests covering decomposition, sketch planning, REST metrics, and GraphQL metadata.
  • Passed pre-commit checks on changed files, including lint, formatting, and mypy.
  • Added regressions for mixed non-decomposable metrics, DISTINCT, malformed declarations, unsupported dialects, and stored compression values.

Deployment Plan

No database migration required. Release an OSS server version containing these hooks before updating and deploying the Netflix t-digest implementation in mp-nflx-dj. Downstream implementations opt into the validation and dialect capabilities; existing decompositions retain their defaults.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit e859efa
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6afe73a56617241343c7c3ca

@betodealmeida

Copy link
Copy Markdown
Member Author

@greptile-apps please review kthxbye!

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain from this review.

Summary

Adds sketch-family call checks and shared dialect compatibility metadata.

  • Sketch families validate aggregate calls and limit query planning to supported dialects.
  • Metric compatibility reports account for registered sketch families.
  • Unsupported stored sketch settings no longer match current components.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Metric SQL and reaggregation declaration] --> B[Resolve and validate aggregate calls]
  B --> C{Every aggregate can decompose?}
  C -->|No| D[Keep the whole metric unchanged]
  C -->|Yes| E{Explicit output engine?}
  E -->|Yes| F[Check declared engine support]
  E -->|No| G[Choose a supported representative engine]
  F --> H[Build components and combiner]
  G --> H
Loading

Reviews (3) · Last reviewed commit: "Cover missing sketch family and direct d..." · Reviewed by Greptile

@betodealmeida
betodealmeida marked this pull request as ready for review November 20, 2026 18:33
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.

2 participants