mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
## Summary - Adds 200 new SQL queries (Q201-Q400) across all 12 categories, extracted as structural templates from production `june6.sql` query patterns - All queries use the existing synthetic `FIELD_POOL` schema — zero real stream/field names - Bumps `data_gen.py` from 200 → 400 queries (4000 records total, 10 per query) - Introduces new structural patterns previously missing from the suite ## New patterns - **CONCAT + COALESCE chains**: Multi-field string construction for display messages - **CASE WHEN inside histogram COUNT**: Platform mapping + conditional aggregation - **Multi-field LIKE / NOT LIKE OR chains**: Text search across 4-8 fields - **NOT IN + IS NOT NULL**: Exclusion filters with null safety - **Long IN lists**: 5+ values in WHERE clauses - **Percentage calculations**: `100.0 * COUNT(CASE WHEN ...) / COUNT(*)` patterns - **approx_percentile_cont in subqueries**: P95/P99 in nested SELECTs - **Histogram with breakdown**: `GROUP BY _time, breakdown` pattern - **char_length CASE fallbacks**: `CASE WHEN char_length(f) > 0 THEN f ELSE fallback END` - **CTE with multiple subquery references**: Self-join and multi-CTE patterns ## Distribution | Category | New | Range | |----------|-----|-------| | aggregation | 25 | Q201-Q225 | | basic_select | 25 | Q226-Q250 | | combined | 20 | Q251-Q270 | | cte_subquery | 25 | Q271-Q295 | | date_time | 10 | Q296-Q305 | | full_text_search | 20 | Q306-Q325 | | histogram | 25 | Q326-Q350 | | math_functions | 8 | Q351-Q358 | | pagination | 7 | Q359-Q365 | | string_functions | 15 | Q366-Q380 | | union | 12 | Q381-Q392 | | window | 8 | Q393-Q400 | ## Test plan - [x] `compute_counts.py` generates DuckDB expected results for all 400 queries - [ ] CI: 800 tests (400 × 2 phases) pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>