Add test: mergeConditionNodes(HAVING, QUALIFY) correctness untested — existing test uses identical conditions#104073
Open
clickgapai wants to merge 1 commit intoClickHouse:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
Retrospective finding from a historical scan of PR #62619 (merged 2024-04-23). Confirmed on current codebase — close with a note if already fixed.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #62619.
That PR PR adds support for the
QUALIFYSQL clause to the new analyzer + planner. Changes cover: (1) parser — newQUALIFYkeyword inCommonParsers.h,ParserSelectQueryparsing branch, andParserAlias::restricted_keywords; (2) AST — newExpression::QUALIFYenum + accessors inASTSelectQuery, `f1.
mergeConditionNodes(HAVING, QUALIFY)correctness untested — existing test uses identical conditionssrc/Planner/Planner.cpp:1978Risk: Planner.cpp:1975-1982 enters the no-window QUALIFY fallback. When both
HAVINGandQUALIFYare present (line 1977), it callsmergeConditionNodes({getHaving(), getQualify()}, ...)(line 1978) whicWhat's unique vs PR tests: PR test 03095_window_functions_qualify.sql line 15 uses
HAVING key = 0 QUALIFY key == 0— IDENTICAL conditions on both sides, so the merge result is invariant to dropping one operand or swapping ANDTry it on ClickHouse Fiddle
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes