Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

[WIP] core: group reduction using union find#187

Draft
yliang412 wants to merge 5 commits intomainfrom
yuchen/group-reduction-using-union-find
Draft

[WIP] core: group reduction using union find#187
yliang412 wants to merge 5 commits intomainfrom
yuchen/group-reduction-using-union-find

Conversation

@yliang412
Copy link
Member

@yliang412 yliang412 commented Oct 14, 2024

The PR uses union-find to maintain group equivalence. This is done by maintaining

  • a DisjointSet of group ids
  • representative group id to Group mapping.

The "path compression" done during union operation speeds up tpch sqlplannertest run from ~89s to ~9s on local machine.

TODO

  • Better to have a Map<GroupId, Group> interface without thinking about reduced group. We can use DisjointGroup to replace get_reduced_group_id, Memo::groups::..., and Memo::merge_group functionalities.

Also improve tpch sqlplannertest run from ~89s to ~9s.

Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant