Skip to content

Add More Window Functions Tests - #122542

Merged
Michicosun merged 9 commits into
masterfrom
window_functions_missing_tests
Sep 29, 2026
Merged

Michicosun merged 9 commits into
masterfrom
window_functions_missing_tests

Conversation

@Michicosun

@Michicosun Michicosun commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

This patch adds additional stateless tests for missing coverage features and a couple of performance tests to pin execution stability. 2 stateless tests are negative tests containing bug reports that pin the execution outcome.


Workflow [PR]
Sync PR [sync-upstream/pr/122542]

Version info

  • Merged into: 26.10.1.1005-master (included in 26.10 and later)

@clickhouse-gh

clickhouse-gh Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [716df61]

Summary: ✅


AI Review

Summary

This PR adds a broad batch of window-function stateless coverage plus several performance workloads. Most of the added coverage looks useful, but two of the new bug_... stateless files intentionally encode behavior their own comments describe as incorrect or inconsistent, so they would make the test suite enforce the bug instead of the contract.

Findings

⚠️ Majors

  • [tests/queries/0_stateless/05269_window_functions_bug_range_frame_nullable_keys_default_order.sql:3] The test explicitly blesses known-wrong RANGE frame results for Nullable sort keys. That keeps CI green only while the bug remains and turns the eventual fix into a reference churn exercise instead of a regression improvement. Suggested fix: land this only together with the executor fix and assert the correct frames, or drop it from the passing suite and track the bug separately.
  • [tests/queries/0_stateless/05270_window_functions_bug_validation_inconsistencies.sql:2] This file similarly pins current validator/executor inconsistencies instead of the intended behavior, including the inline-window diagnostic mismatch and silent IGNORE NULLS acceptance. Suggested fix: convert these into true regression tests that assert the correct diagnostics/semantics together with the implementation fix, or omit them until that fix exists.
Final Verdict

Changes requested.

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Sep 27, 2026
@Michicosun Michicosun added the pr-performance Pull request with some performance improvements label Sep 27, 2026
@rienath rienath self-assigned this Sep 28, 2026

@rienath rienath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. many_small_partitions.xml and window_functions_sliding_frames.xml are unstable. Please check which exact queries cause this and stabilise/remove them.
  2. We add tests that pin buggy behaviour. Shall we also create issues for each of those s.t. they do not become the default?

@clickhouse-gh clickhouse-gh Bot added comp-window-functions Window function execution + frame handling (ROW_NUMBER/RANK/LAG/LEAD, frames, partitions, order). and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-window-functions Window function execution + frame handling (ROW_NUMBER/RANK/LAG/LEAD, frames, partitions, order). pr-not-for-changelog This PR should not be mentioned in the changelog pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants