Skip to content

Fix hashing of NULLs, attempt 3#79008

Merged
rschu1ze merged 6 commits intomasterfrom
hashnull
Apr 13, 2025
Merged

Fix hashing of NULLs, attempt 3#79008
rschu1ze merged 6 commits intomasterfrom
hashnull

Conversation

@al13n321
Copy link
Copy Markdown
Member

@al13n321 al13n321 commented Apr 11, 2025

Changelog category (leave one):

  • Improvement

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

Hash functions now support NULLs inside arrays, tuples, and maps. (issues #48365 and #48623)

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Closes #48365
Closes #48623

Based on #58754 , which was based on #48625 . Hopefully this one will make it, this seems really useful for tests.

This shouldn't break compatibility because it only affects queries that would previously fail (refusing to hash an array/tuple/map with Nullable inside).

The somewhat error-prone behavior hash(null, ...) == null remains, but is easy to work around using hash(tuple(...)).

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Apr 11, 2025

Workflow [PR], commit [13a2a19]

@clickhouse-gh clickhouse-gh bot added the pr-improvement Pull request with some product improvements label Apr 11, 2025
@al13n321 al13n321 requested a review from rschu1ze April 11, 2025 02:14
@rschu1ze rschu1ze self-assigned this Apr 11, 2025
@rschu1ze rschu1ze enabled auto-merge April 13, 2025 15:06
@rschu1ze rschu1ze added this pull request to the merge queue Apr 13, 2025
Merged via the queue into master with commit 813f49a Apr 13, 2025
115 of 122 checks passed
@rschu1ze rschu1ze deleted the hashnull branch April 13, 2025 15:23
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 13, 2025
@rienath rienath added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jun 23, 2025
robot-ch-test-poll4 added a commit that referenced this pull request Jun 23, 2025
Cherry pick #79008 to 25.3: Fix hashing of NULLs, attempt 3
robot-ch-test-poll4 added a commit that referenced this pull request Jun 23, 2025
Cherry pick #79008 to 25.4: Fix hashing of NULLs, attempt 3
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created-cloud deprecated label, NOOP label Jun 23, 2025
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jun 23, 2025
rienath added a commit that referenced this pull request Jun 23, 2025
Backport #79008 to 25.3: Fix hashing of NULLs, attempt 3
rienath added a commit that referenced this pull request Jun 23, 2025
Backport #79008 to 25.4: Fix hashing of NULLs, attempt 3
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-improvement Pull request with some product improvements pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR 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.

Hash on array with NULL throws exception AnyHash of arrays or tuples of nullable values

6 participants