Skip to content

props: don't leave unmerged equiv groups in EquivSet#137558

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
DrewKimball:fix-equiv
Dec 17, 2024
Merged

props: don't leave unmerged equiv groups in EquivSet#137558
craig[bot] merged 1 commit intocockroachdb:masterfrom
DrewKimball:fix-equiv

Conversation

@DrewKimball
Copy link
Copy Markdown
Collaborator

This commit fixes a bug in EquivSet.tryMergeGroups, which could cause an invariant (that equiv groups are non-intersecting) to be violated. This would potentially cause re-ordered joins to have redundant equality filters, and prevent join filter push-down in rare cases. This commit also adds verification to the set for test builds, and a unit test for the Add method.

Fixes #137381

Release note: None

This commit fixes a bug in `EquivSet.tryMergeGroups`, which could cause
an invariant (that equiv groups are non-intersecting) to be violated.
This would potentially cause re-ordered joins to have redundant equality
filters, and prevent join filter push-down in rare cases. This commit
also adds verification to the set for test builds, and a unit test for
the `Add` method.

Fixes cockroachdb#137381

Release note: None
@DrewKimball DrewKimball requested a review from mgartner December 16, 2024 21:49
@DrewKimball DrewKimball requested a review from a team as a code owner December 16, 2024 21:49
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

:lgtm: Nice fix! I can't believe I spotted that one...

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball)

@DrewKimball
Copy link
Copy Markdown
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 17, 2024

@craig craig bot merged commit 777b99d into cockroachdb:master Dec 17, 2024
@DrewKimball DrewKimball deleted the fix-equiv branch December 17, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

props: don't leave unmerged equiv groups in EquivSet

3 participants