Skip to content

Keep ClickBench SQL in sync across runners - #25773

Merged
kosiew merged 5 commits into
apache:mainfrom
kosiew:dupcheck-01-25031
Oct 15, 2026
Merged

kosiew merged 5 commits into
apache:mainfrom
kosiew:dupcheck-01-25031

Conversation

@kosiew

@kosiew kosiew commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The extended Q6 benchmark uses different SQL from the other ClickBench runners, while Q15 and Q16 are absent from the SQL-benchmark suite and SQL logic test. These copies can drift again when a query is edited in only one place.

What changes are included in this PR?

  • Remove the URL cast from the extended Q6 benchmark query.
  • Add extended Q15 and Q16 SQL benchmarks and corresponding SQL logic test entries.
  • Add a parity test for standard and extended ClickBench. It checks that each benchmark query appears in its SQL logic test and that benchmark and legacy query files have matching IDs and normalized SQL.
  • Update both SQL logic test headers to identify the mirrored query locations.

Are these changes tested?

The patch adds clickbench_parity.rs and six unit tests covering SQL logic test parsing and SQL normalization. It also adds Q15/Q16 SQL logic test entries with expected value 0.

The diff does not show test execution, generation of those expected values, or the requested Q6 comparisons in single and partitioned configurations.

Are there any user-facing changes?

The extended Q6 SQL benchmark now runs without the URL cast. Q15 and Q16 are added to the extended SQL-benchmark suite. The diff does not establish whether removing the cast changes Q6 results. No public API change is shown.

LLM-generated code disclosure

This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed.

- Added benchmarks/tests/clickbench_parity.rs with standard, extended .benchmark ↔ SLT membership and legacy .sql ID/SQL checks.
- Included empty named exception list and comment/whitespace normalization.
- Removed Q6 redundant URL cast.
- Added extended Q15/Q16 benchmarks and SLT coverage; generated outputs (0).
- Updated ClickBench SLT maintenance pointers.
- Preserves single/double/dollar quoted whitespace/newlines.
- Handles E'...' escapes.
- Added regressions.
…ries

- read_slt_queries now includes first-file query.
- Added interleaved + multiline SLT regression.
- Quote-aware SLT detection, ignoring fake query inside SQL literals
- Skip expected-output blocks before next directive
- Added two new regressions
@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Sep 26, 2026
@codecov-commenter

codecov-commenter commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.84%. Comparing base (91cd7ff) to head (1b97a02).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25773      +/-   ##
==========================================
- Coverage   82.84%   82.84%   -0.01%     
==========================================
  Files        1151     1151              
  Lines      455510   455510              
  Branches   455510   455510              
==========================================
- Hits       377362   377351      -11     
- Misses      55236    55244       +8     
- Partials    22912    22915       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kosiew
kosiew marked this pull request as ready for review September 26, 2026 10:09
@kosiew
kosiew requested a review from adriangb September 26, 2026 10:09
@Omega359

Copy link
Copy Markdown
Contributor

I don't know if we need the parity test to be honest - at least for queries vs sql_benchmarks/... At some point this fall I plan on either removing the queries in benchmark/queries or pointing the sql benchmarks at the query files. More likely the latter though I do think there is a few queries where that may be problematic.

Otherwise lgtm.

@kosiew

kosiew commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

🚀
@Omega359, @adriangb,
Thank you for your review.

@kosiew
kosiew added this pull request to the merge queue Oct 15, 2026
Merged via the queue into apache:main with commit b645de0 Oct 15, 2026
42 checks passed
@kosiew
kosiew deleted the dupcheck-01-25031 branch October 15, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt) v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants