Skip to content

feat(snuba): Add ConditionalFormula to Column proto for EAP queries#173

Merged
phacops merged 2 commits intomainfrom
feat/add-conditional-formula-to-column
Feb 9, 2026
Merged

feat(snuba): Add ConditionalFormula to Column proto for EAP queries#173
phacops merged 2 commits intomainfrom
feat/add-conditional-formula-to-column

Conversation

@phacops
Copy link
Collaborator

@phacops phacops commented Jan 30, 2026

Add support for conditional expressions in EAP queries by introducing
ConditionalFormula and FormulaCondition message types to the Column proto.

This enables use cases like calculating hourly event rates with different
formulas based on aggregate values:

if(min(timestamp) < one_week_ago,
   count(*) / 168,                    -- use full week for old issues
   count(*) / hours_since_first_seen) -- use actual hours for new issues

Changes:

  • Add ConditionalFormula message with condition, match, and default fields
  • Add FormulaCondition message with comparison operators (left, op, right)
  • Add conditional_formula as field 7 in the Column oneof

Add support for conditional expressions in EAP queries by introducing
ConditionalFormula and FormulaCondition message types to the Column
proto. This enables use cases like calculating hourly event rates with
different formulas based on aggregate values.

Co-Authored-By: Claude <noreply@anthropic.com>
@phacops phacops requested a review from a team as a code owner January 30, 2026 22:44
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJan 30, 2026, 10:45 PM

@phacops phacops merged commit b93b6ef into main Feb 9, 2026
9 checks passed
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

Comments