Skip to content

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

@DrewKimball

Description

@DrewKimball

There is 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. The issue (called out by @mgartner here) is that the method removes an item from the slice by replacing it with the last item while iterating forward. This results in the swapped item not being encountered by the loop.

Jira issue: CRDB-45545

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries Teambranch-masterFailures and bugs on the master branch.branch-release-23.2Used to mark GA and release blockers, technical advisories, and bugs for 23.2branch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1branch-release-24.2Used to mark GA and release blockers, technical advisories, and bugs for 24.2branch-release-24.3Used to mark GA and release blockers, technical advisories, and bugs for 24.3

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions