Skip to content

fix(query-engine): skip orphaned dual-population groups in instant queries instead of failing - #602

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
597-instant-vs-range-queries-diverge-on-missing-value-data-handling-for-a-dual-population-group
Aug 25, 2026
Merged

fix(query-engine): skip orphaned dual-population groups in instant queries instead of failing#602
milindsrivastava1997 merged 1 commit into
mainfrom
597-instant-vs-range-queries-diverge-on-missing-value-data-handling-for-a-dual-population-group

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Contributor

Summary

Fixes #597. Instant queries and range queries handled the same edge case differently: a "dual-population" group (separate key/value aggregations) that has key data but no value data anywhere.

Before: instant query hard-fails the whole query.

count(event_frequency) by (region, host, event)

If region=orphan has keys but no values, the entire query errors out — region=normal's perfectly good results disappear too.

After: instant query skips just the orphaned group (with a warn! log) and returns the rest.

region=normal -> results returned normally
region=orphan -> silently skipped, logged as a warning

This matches how range queries already behave (fixed in #583) — a hard-fail was disproportionate for one missing group, and now both query types agree.

Test plan

  • Added instant_query_dual_population_group_with_no_value_data_is_skipped_not_fatal, mirroring the existing range-path regression test
  • Full query_engine_rust test suite passes (568 tests)
  • cargo clippy clean

🤖 Generated with Claude Code

…eries instead of failing

collect_results_separate_keys hard-failed the entire instant query
whenever a keys-side group had no matching entry in merged_values,
diverging from the range path's #583 fix which skips the orphaned
group with a warning instead. Bring instant in line with range (#597).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@milindsrivastava1997
milindsrivastava1997 merged commit faff7b8 into main Aug 25, 2026
8 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.

Instant vs range queries diverge on missing-value-data handling for a dual-population group

1 participant