Skip to content

feat(query): OR groups in where-clauses - #1193

Merged
Makisuo merged 3 commits into
fix/semconv-current-key-readsfrom
feat/where-clause-or-groups
Sep 30, 2026
Merged

Makisuo merged 3 commits into
fix/semconv-current-key-readsfrom
feat/where-clause-or-groups

fix(query): only opt into OR groups for sources that apply them

4e9a879
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 30, 2026 in 1m 53s

Confidence 4/5 · No issues found

🟢 Confidence 4/5 · likely safe to merge
The change only narrows which sources parse OR groups; every affected branch is covered by the new logs/metrics/product_events test.
quality 100/100 · no findings · tests covered · risk medium

The builder now opts into OR groups only for the two sources that lower them (traces, logs); metrics and product_events keep the parser's "unsupported clause" warning they already produced on the base branch. Narrow, tested, safe to merge.

  • buildTimeseriesQuerySpec passes orGroups only for traces and logs
  • Metrics no longer gets its own OR-group warning; the parser's unsupported-clause warning replaces it
What was checked
  • applyOrGroup builds each member on a fresh empty accumulator, so a rejected member cannot half-apply (model.ts:406)
  • Metrics and product_events clauses still reach applyMetricsClause/product-event fold via clauses; groups is empty for them (model.ts:1671)
  • OR filters stay out of MV/skip-index paths: canUseTraceListMvStage1, canUseServiceOverviewMv, extractTracesFacetsOpts all bail on af.or

4e9a879 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.