Skip to content

Fix logical error resolving matcher with multiple JOINs#82421

Merged
vdimir merged 3 commits intomasterfrom
vdimir/multiple_join_use_nulls_matcher
Jun 27, 2025
Merged

Fix logical error resolving matcher with multiple JOINs#82421
vdimir merged 3 commits intomasterfrom
vdimir/multiple_join_use_nulls_matcher

Conversation

@vdimir
Copy link
Copy Markdown
Member

@vdimir vdimir commented Jun 23, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jun 23, 2025

Workflow [PR], commit [f726144]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 23, 2025
@serxa serxa self-assigned this Jun 24, 2025
@serxa serxa requested a review from Copilot June 24, 2025 10:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a logical error in resolving matchers when processing queries with multiple JOINs. The changes include:

  • Adding SQL tests to validate JOIN behavior with NULL handling.
  • Updating the query analyzer to iterate over all registered table expressions to handle multiple JOIN nodes.
  • Updating the reference output to reflect the correct expected results.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/queries/0_stateless/03546_multiple_join_use_nulls_matcher.sql New test file defining tables, JOIN queries, and cleanup statements to validate the fix.
tests/queries/0_stateless/03546_multiple_join_use_nulls_matcher.reference New reference file with expected output values for the updated SQL tests.
src/Analyzer/Resolve/QueryAnalyzer.cpp Revision to the join resolution logic by iterating over registered table expressions to correctly resolve JOINs.

@vdimir vdimir force-pushed the vdimir/multiple_join_use_nulls_matcher branch from 32f950a to 5152a60 Compare June 25, 2025 07:40
@vdimir vdimir force-pushed the vdimir/multiple_join_use_nulls_matcher branch from 5152a60 to f726144 Compare June 25, 2025 07:46
@vdimir vdimir enabled auto-merge June 27, 2025 08:58
@vdimir vdimir added this pull request to the merge queue Jun 27, 2025
Merged via the queue into master with commit 27f935f Jun 27, 2025
237 of 239 checks passed
@vdimir vdimir deleted the vdimir/multiple_join_use_nulls_matcher branch June 27, 2025 14:56
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default 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.

Unexpected return type from equals. Expected UInt8. Got Nullable(UInt8).

4 participants