Skip to content

fix hasEqualValues for nullable columns#80913

Merged
GrigoryPervakov merged 1 commit intomasterfrom
nullable-sharding
May 30, 2025
Merged

fix hasEqualValues for nullable columns#80913
GrigoryPervakov merged 1 commit intomasterfrom
nullable-sharding

Conversation

@GrigoryPervakov
Copy link
Copy Markdown
Member

For nullable columns, hasEqualValues returns true if the first value is null.
It leads to errors during data partitioning in cases like VALUES (NULL), (1), (2), (3), so all values go to the single partition
https://fiddle.clickhouse.com/88ed6ef0-30e7-4b69-922e-2bcccb36acf4

Closes #74072

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):

Fix wrong partitioning with nullable partition key

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented May 27, 2025

Workflow [PR], commit [8c0d931]

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label May 27, 2025
@Avogar Avogar self-assigned this May 27, 2025
@GrigoryPervakov GrigoryPervakov force-pushed the nullable-sharding branch 2 times, most recently from c0554ad to fe1e03c Compare May 27, 2025 20:06
@PedroTadim
Copy link
Copy Markdown
Member

Just a comment. Don't forget some of the bug fixes may be worth backporting?

@GrigoryPervakov GrigoryPervakov added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label May 28, 2025
@GrigoryPervakov
Copy link
Copy Markdown
Member Author

Failed tests:
test_backup_restore_on_cluster/test_cancel_backup.py::test_short_disconnection_doesnt_stop_backup is flaky #80359
03519_storage_url is flaky #80725
CH died in stress tests with #50666

@GrigoryPervakov GrigoryPervakov added this pull request to the merge queue May 30, 2025
Merged via the queue into master with commit cf0fc36 May 30, 2025
116 of 123 checks passed
@GrigoryPervakov GrigoryPervakov deleted the nullable-sharding branch May 30, 2025 12:30
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 30, 2025
robot-clickhouse-ci-2 added a commit that referenced this pull request May 30, 2025
Cherry pick #80913 to 24.8: fix hasEqualValues for nullable columns
robot-clickhouse-ci-2 added a commit that referenced this pull request May 30, 2025
Cherry pick #80913 to 25.3: fix hasEqualValues for nullable columns
robot-clickhouse-ci-2 added a commit that referenced this pull request May 30, 2025
Cherry pick #80913 to 25.4: fix hasEqualValues for nullable columns
robot-clickhouse-ci-2 added a commit that referenced this pull request May 30, 2025
Cherry pick #80913 to 25.5: fix hasEqualValues for nullable columns
@robot-clickhouse robot-clickhouse added the pr-backports-created-cloud deprecated label, NOOP label May 30, 2025
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label May 30, 2025
GrigoryPervakov added a commit that referenced this pull request May 30, 2025
Backport #80913 to 25.5: fix hasEqualValues for nullable columns
GrigoryPervakov added a commit that referenced this pull request May 30, 2025
Backport #80913 to 25.4: fix hasEqualValues for nullable columns
GrigoryPervakov added a commit that referenced this pull request May 30, 2025
Backport #80913 to 25.3: fix hasEqualValues for nullable columns
GrigoryPervakov added a commit that referenced this pull request May 30, 2025
Backport #80913 to 24.8: fix hasEqualValues for nullable columns
@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-bugfix Pull request with bugfix, not backported by default 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.

Wrong result with AggregatingMergeTree

6 participants