mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
## Summary Expands the query-agent regression test suite from **672 → 1,000 queries** by adding 328 complex queries (Q672–Q999) across all 13 categories. ## What changed - **`data_gen.py`**: `NUM_QUERIES` bumped from 675 → 1000 so `build_dataset()` generates records for all query IDs - **13 query JSON files**: 328 new queries appended, with DuckDB-computed expected results via `compute_counts.py` - **`gen_q672_q999.py`**: new generation script (idempotent — re-running skips all existing queries) ## New query patterns added Targets DataFusion-upgrade-fragile areas identified from past breakage: | Pattern | Examples | |---|---| | 3-stream JOINs + correlated EXISTS | Q672–Q677 | | FULL OUTER JOIN between streams | Q693–Q696 | | Window + DISTINCT (FIRST_VALUE, LAST_VALUE, NTH_VALUE) | Q717–Q730 | | Named WINDOW clauses | Q731–Q736 | | LAG/LEAD with CASE trend detection | Q742–Q751 | | match_all + GROUP BY + HAVING | Q792–Q796 | | INTERSECT/EXCEPT with CTEs | Q822–Q849 | | Deep CTE chains (3+ CTEs, self-joins) | Q757–Q791 | | Correlated scalar subqueries in SELECT | Q769–Q776 | | Histogram with JOIN between streams | Q901–Q905 | ## Issues fixed - **4 duplicate IDs** (Q545–Q548) existed in both `cte_subquery.json` and `full_text_search.json` — renumbered FTS copies to available gaps (Q025, Q611, Q631, Q1000) - **27 queries** using OO-specific functions (match_all, spath, regexp_like, window-inside-aggregate) annotated with `skip_sqllogictest: true` ## Final breakdown | Category | Before | After | |---|---|---| | cte_subquery | 89 | 124 | | aggregation | 71 | 99 | | string_functions | 70 | 92 | | combined | 73 | 88 | | full_text_search | 58 | 88 | | window | 48 | 88 | | basic_select | 71 | 86 | | histogram | 57 | 79 | | union | 34 | 62 | | cross_stream | 16 | 61 | | date_time | 37 | 60 | | pagination | 22 | 42 | | math_functions | 26 | 31 | | **Total** | **672** | **1,000** | - **956** queries use sqllogictest mode (DuckDB-verified results) - **44** use legacy assertion mode (OO-specific functions, histograms) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>