Fix logical error in ARRAY JOIN when one of the table columns is empty tuple column#91123
Merged
nihalzp merged 5 commits intoClickHouse:masterfrom Dec 12, 2025
Merged
Conversation
Contributor
|
Workflow [PR], commit [e02e39f] Summary: ❌
|
ARRAY JOIN when one of the table column is empty tuple columnARRAY JOIN when one of the table columns is empty tuple column
yariks5s
approved these changes
Dec 5, 2025
Avogar
reviewed
Dec 5, 2025
| ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH, "Size of indexes ({}) is less than required ({})", indexes.size(), result_size); | ||
|
|
||
| return cloneResized(limit ? limit : column_length); | ||
| return cloneResized(result_size); |
Member
There was a problem hiding this comment.
There is a similar bug in ColumnTuple::permute. Let's also fix it here.
Also there is a bug in ColumnTuple::expand, the result size should be mask.size(), not countBytesInFilter(mask). Let's also fix it
Member
Author
There was a problem hiding this comment.
Thanks for catching it! I have tried to fix it and added unit tests.
Avogar
approved these changes
Dec 12, 2025
Merged
via the queue into
ClickHouse:master
with commit Dec 12, 2025
cc876e4
248 of 256 checks passed
robot-clickhouse-ci-2
added a commit
that referenced
this pull request
Dec 12, 2025
Cherry pick #91123 to 25.10: Fix logical error in `ARRAY JOIN` when one of the table columns is empty tuple column
robot-clickhouse
added a commit
that referenced
this pull request
Dec 12, 2025
…of the table columns is empty tuple column
robot-clickhouse-ci-2
added a commit
that referenced
this pull request
Dec 12, 2025
Cherry pick #91123 to 25.11: Fix logical error in `ARRAY JOIN` when one of the table columns is empty tuple column
robot-clickhouse
added a commit
that referenced
this pull request
Dec 12, 2025
…of the table columns is empty tuple column
clickhouse-gh bot
added a commit
that referenced
this pull request
Dec 12, 2025
Backport #91123 to 25.11: Fix logical error in `ARRAY JOIN` when one of the table columns is empty tuple column
clickhouse-gh bot
added a commit
that referenced
this pull request
Dec 13, 2025
Backport #91123 to 25.10: Fix logical error in `ARRAY JOIN` when one of the table columns is empty tuple column
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.
The following query has logical error:
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix logical error in
ARRAY JOINwhen one of the table columns is empty tuple column. Closes #90801.Documentation entry for user-facing changes